Functional Notations for Color Systems

Color property values can be declared in hexadecimal form, or using the functional notations of various color systems, with syntax color-func(c1 c2 c3 [/c4]) . Components 1, 2, and 3 select the color in the given system. Component 4, optional and separated by forward slash, is always transparency.

Functional Notations Reference
NameSpace c1c2c3
rgbsRGBRedGreenBlue
hsvsRGBHueSaturationLightness
hwbsRGBHueWhitenessBlackness
oklabOklabLightnessRed-GreenBlue-Yellow
oklchOklabLightnessChromaHue

Palettes

Styling form swatches is possible but support varries depending on user-agent.

Relative colors in plain CSS

Styling Color Input Swatches

Color Picker Form