Skip to main content

ColorCode

The content of key shall represent a color in RGB or HSL format with optional alpha channel. Refer to the valid examples for syntax. Standard color pickers will provide a valid format.

Parameter table​

paramunitrequireddescription
keyyesThe key of the value to be a color code (key).
allowAlphanoAllow the use of alpha channel (transparency).

How to setup​

The rule makes sure that the provided key can be read as a color by most tools.

Examples​

valuevalidallowAlphadescription
#fc4✅Reduced HEX starting with #
0xfc4✅1Reduced HEX starting with 0x
#ffcc44✅Full HEX starting with #
0xffcc44ff✅1Full HEX with alpha starting with 0x
rgb(255, 204, 68)✅RGB function
rgba(255, 20, 68, 0.8)✅1RGB function with alpha channel
hsl(0.12, 1.00, 0.63)✅HSL function