TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

IColorPickerConfigSection Interface

A structure defining basic properties of Color picker sections. For details, see the Color Picker topic.

example
configuration = {
    widgets: {
        ColorPicker: {
            colorSpace: "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 targets

targets: ColorPickerTarget []

An item property that you can specify a color for. The default value is ["All"].

Optional translationKey

translationKey: string

The section name. You can use either a string or an identifier of a string defined in the ~\Configuration\translations.json file.

type

The color section type, one of "NoColorSection" , "RecentSection" , "ThemeSection" , or "PaletteSection" .

Optional viewType

The appearance of the section, either "Block" or "Line". The default value is "Block".