IColorPickerConfigParsed Interface

A structure defining the Color picker. For details, see the Color Picker topic.

example
configuration = {
    widgets: {
        ColorPicker: {
            defaultColorSpace: "rgb",
            availableColorSpaces: [ "cmyk", "rgb" ],
            sections: [
              {
                type: "NoColorSection",
                targets: [ "Fill", "Border", "Background" ]
              },
              {
                type: "RecentSection",
                translationKey: "ColorPicker.RECENT_SECTION_NAME"
              },
              {
                type: "PaletteSection",
                translationKey: "Swatches",
                viewType: "Line",
                palette: [["rgb(0, 0, 0)","rgb(255, 255, 255)"],
                          ["rgb(255, 0, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 255)","rgb(0, 0, 255)","rgb(255, 0, 255)"]]
              }
            ]
        }
    }
};

Properties

Optional availableColorSpaces

availableColorSpaces: ColorSpaceType []

Specifies the color spaces that will be available to your users in the Color picker. The default value is ["rgb", "cmyk"].

Optional defaultColorSpace

defaultColorSpace: ColorSpaceType

Defines the default color space. The default value is "cmyk".

Optional palette

palette: string [] []

Deprecated, define a palette in the corresponding section . Palette to show in color picker; a palette is defined by a two-dimensional array of colors in a css-compatible format. The default value is [["rgb(0, 0, 0)","rgb(67, 67, 67)",...],...].

Optional sectionCollapseEnabled

sectionCollapseEnabled: boolean

If true, allows users to collapse the sections of predefined palettes when they click headers of these sections in the Color picker. The default value is false.

sections

A set of predefined palettes.

Optional showPaletteOnly

showPaletteOnly: boolean

If true, shows the predefined palettes and hides the color field in the Color picker. If false, shows both the predefined palettes and the field. The default value is false.