Color
For a human-readable color like
'red'
, use human()
.ff0000
used in HTML/CSS, use rgb()
. There are also methods for other color formats such as hsl()
, cmyk()
, hwb()
, lab()
, and lch()
.cmyk
| --- | --- |
| format | ColorFormat |
'decimal'
| Format of generated CMYK color. |
colorByCSSColorSpace
Name | Type | Default | Description |
---|---|---|---|
format | ColorFormat | 'decimal' | Format of generated RGB color. |
space | ColorFormat | \sRGB' | 'display-p3' | 'rec2020' | 'a98-rgb' | 'prophoto-rgb' | Color space to generate the color for. |
cssSupportedFunction
cssSupportedSpace
hsl
Name | Type | Default | Description |
---|---|---|---|
format | ColorFormat | 'decimal' | Format of generated RGB color. |
includeAlpha | boolean | false | Adds an alpha value to the color (RGBA). |
human
hwb
Name | Type | Default | Description |
---|---|---|---|
format | ColorFormat | 'decimal' | Format of generated RGB color. |
lab
Name | Type | Default | Description |
---|---|---|---|
format | ColorFormat | 'decimal' | Format of generated RGB color. |
lch
Name | Type | Default | Description |
---|---|---|---|
format | ColorFormat | 'decimal' | Format of generated RGB color. |
rgb
Name | Type | Default | Description |
---|---|---|---|
casing | Casing | 'lower' | FLetter type case of the generated hex color. Only applied when 'hex' format is used. |
format | ColorFormat | 'decimal' | Format of generated RGB color. |
includeAlpha | boolean | 'false' | Adds an alpha value to the color (RGBA). |
prefix | string | '#' | Prefix of the generated hex color. Only applied when 'hex' format is used. |
space