Syntax

	color("red")
color("#ff0099")
color(r: 200, g: 60, b: 20, a: 200)
color(h:150, s:30, l:60)

Description

Generates a color value either from a CSS color description or via the components in the red-green-blue or HSL color space.

Parameter

Color name Type Type Description Mandatory Default
css String The CSS color description. no -
r Number The red value (0..255) no 0
g Number The green value (0..255) no 0
b Number The blue value (0..255) no 0
a Number The alpha value (0..255) no 255
h Number The hue angle (0..360) no 0
s Number The saturation (0..100) no 100
l Number The luminance (0..100) no 50
from Color Sample color no -

Return value

Type: Color

The color that corresponds to the specified values. The following rules apply in the specified order:

Examples

All colors of the rainbow

	count(0, 360, 20).map(h -> color(h: $h, s:80))

Output: List with the colors of the rainbow