represents a color slider currently set to the color corresponding to color.


uses the dynamically updated current value of color, with the value of color being reset if the color is modified.


represents a color slider with an initial gray color.

Details and Options

  • ColorSlider[] displays in a notebook as a color slider that can be manipulated interactively.
  • ColorSlider[Dynamic[x]] will reset the value of x when the slider is moved; ColorSlider[x] will not.
  • 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 "Swatch" and "Spectrum" elements. Elements to use can be specified in any order in a list given as the setting for AppearanceElements.
  • Setting can be used to find the color specified by ColorSlider.
  • The settings for BaseStyle are appended to the default style typically given by the "ColorSlider" style in the current stylesheet.


open all close all

Basic Examples  (1)

Click for copyable input

Dynamically set the variable to the selected color:

Click for copyable input

Scope  (1)

Options  (12)

Applications  (1)

Properties & Relations  (1)

Neat Examples  (1)

Introduced in 2007