Color
Color gives editors a color picker for things like a book's series color or a category's badge color.
Editors can pick visually, or type a value in hex, RGB, HSL or HSB. Input formats limits which of those modes the picker offers, and Allow format switching shows or hides the mode buttons. Whatever format an editor uses, the value is saved as a hex code such as #1E7F5C, which works everywhere CSS does.
Turn on Allow alpha channel to let editors choose transparency. The value is then saved with two extra digits for the opacity: #1E7F5C80.
Technical details for LLMs
- Type key:
color. Settings:allowed_formats(hex,hsl,rgb,hsb; all by default; input modes only),format_selectable(default true),show_alpha(default false),placeholder,default_value(hex). - Stored: uppercase
#RRGGBB, or#RRGGBBAAwhenshow_alphais on (a 6-digit input getsFF). Input that isn't 6- or 8-digit hex is kept as typed with anInvalid color value.warning. - Abilities write: a
#RRGGBBor#RRGGBBAAstring.