ColorSetter

ColorSetter[color]

represents a color setter which displays as a swatch of the specified color and when clicked brings up a system color picker dialog.

ColorSetter[Dynamic[color]]

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

ColorSetter[]

gives a color setter with initial color gray.

Details and Options

  • The following options can be given:
  • BaselinePositionAutomaticalignment relative to surrounding text
    BaseStyle{}base style specifications for the color setter
    EnabledAutomaticwhether the color setter is enabled, or grayed out
    ImageMargins0margins around the image of the displayed color setter
    ImageSizeAutomaticthe overall image size of the displayed color setter
  • The settings for BaseStyle are appended to the default style typically given by the "ColorSetter" style in the current stylesheet.
  • Setting can be used to find the color specified by ColorSetter.

Examples

open allclose all

Basic Examples  (1)

Use Pink as the initial value:

In[1]:=
Click for copyable input
Out[1]=

Dynamically change :

In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Options  (5)

Applications  (1)

Properties & Relations  (1)

See Also

ColorSlider  Locator  SystemDialogInput  Setter  Blend

Tutorials

Introduced in 2007
(6.0)