This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ColorSlider

ColorSlider[color]
represents a color slider currently set to the color corresponding to color.
ColorSlider[Dynamic[color]]
uses the dynamically updated current value of color, with the value of color being reset if the color is modified.
ColorSlider
represents a color slider with an initial gray color.
  • ColorSlider[...] displays in a notebook as a color slider that can be manipulated interactively.
  • The following options can be given:
AppearanceElementsAutomaticelements to include in the color slider
BaselinePositionAutomaticalignment relative to surrounding text
BaseStyle{}base style specifications for the color slider
EnabledAutomaticwhether the color slider is enabled, or grayed out
ImageMargins0margins around the image of the displayed color slider
ImageSizeAutomaticthe overall image size of the displayed color slider
  • A default color slider includes and elements. Elements to use can be specified in any order in a list given as the setting for AppearanceElements.
  • The settings for BaseStyle are appended to the default style typically given by the style in the current stylesheet.
Dynamically set the variable to the selected color:
In[1]:=
Click for copyable input
Out[1]=
Dynamically set the variable to the selected color:
In[2]:=
Click for copyable input
Out[2]=
Copy and use Evaluate in Place (Ctrl+Shift+Enter) to display as an actual color slider:
Then use Setting to retrieve the RGB value of the color slider:
Select which appearance element to include:
By default no colors change until you click in the slider area:
By setting AutoAction, the colors change as the mouse moves over the slider area:
Change the background colors:
Change the background color dynamically:
Align with the surrounding text:
By default, variables are continuously updated:
Setting ContinuousAction to False makes variable updates only when the color slider is released:
By default ColorSlider is enabled:
By setting Enabled -> False, the color slider is disabled but visible in its current state:
Add margins:
Change the overall size:
Create a colorful drawing:
New in 6