Color
A widget used to select a color value. Value is saved as a comma-delimited string, unless componentValueType is 'hex', in which case the two-digit hex values are concatenated with no delimiter.
Specification
- colorSpace (optional) keyword for color representation type. Can be 'rgb','hsv','cmyk','hsl'. Default is 'rgb'
- alpha (optional) if true save an alpha band, appended as a fourth (or fifth, in the case of cmyk) element in the resulting string. Default is 'false'
- componentValueType (optional) keyword for the component value types. Can be 'int' (range 0–255), 'float' (range 0.0–1.0), or 'hex' (range 00–FF). Default is 'int'
- valueFormat (deprecated, optional) Format string where %1 is a placeholder for the raw parameter value (should be able to remove this after tweaking MapboxStyler slightly)
Example
{
"name": "somecolor",
"type": "color",
"valueType": "string",
"prompt": "Layer color",
"defaultValue": "#0000ff",
"colorSpace": "rgb",
"alpha": false,
"componentValueType": "hex",
"valueFormat": "#%1"
}