Color Picker
A color selection control. Stores a .string value (hex color like "#FF6B6B").
Type
"colorPicker"
Relevant Fields
Inherits all Control Definition. Key fields:
| Field | Type | Default | Description |
|---|---|---|---|
label |
string | — | Display label |
defaultValue |
string | — | Initial hex color (e.g., "#F4B860") |
Example
{
"type": "colorPicker",
"id": "lr-color",
"position": [1, 3],
"defaultValue": "#F4B860",
"label": "Color",
"action": { "method": "meshsocket", "mode": "broadcast", "event": "route_msg", "payload": { "target_id": "hue-bridge", "type": "color", "payload": { "room": "living", "hex": "{{value}}" } } }
}
Behavior
- Shows the iOS system color picker on tap
- Value stored and transmitted as
#RRGGBBhex string {{value}}in actions is the hex string
Related
- Control Definition — Base fields
- Actions —
{{value}}substitution