form ยท console.warn
form.color: "{value}" is not a colour (#rgb,...
Printed by form, prefixed [lattice], since 1.100.1.
Warnings reference › form.color.setValue
- Identifier
form.color.setValue- Raised by
- form
- Since
- 1.100.1
What happened
A color item's setValue/item.setValue() was given a value that is not a #rgb/#rrggbb hex string and not an rgb(r, g, b) string, so there was nothing to normalise into the item's own value shape. The control keeps its previously committed value (or null) rather than writing something it could not make sense of.
The fix
Give setValue a #rgb, #rrggbb or rgb(r, g, b) string.
The smallest fix
form.getItem('brand').setValue('#1a2b3c'); // or 'rgb(26, 43, 60)'
Reference
Covered in full at the API reference.