Color From HSL
A color from hue, saturation and lightness.
Node id color/from-hsl
The Color From HSL node outputs the color with hue h, saturation s,
lightness l and opacity a. HSL is often easier to vary than red, green
and blue: change h to go around the color wheel, keeping the colors
equally bright.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| h | number | 0 | |
| s | number | 1 | |
| l | number | 0.5 | |
| a | number | 1 |
Outputs
| Name | Type | Notes |
|---|---|---|
| color | Color |
Behaviour
- Fractions. All four inputs go from 0 to 1, not 0 to 360 or 0 to 100:
h: 0 is red, 1/3 green, 2/3 blue, and 1 red again;s: 0 is gray, 1 the full color;l: 0 is black, 0.5 the full color, 1 white;a: 0 is transparent, 1 opaque.
- Defaults.
h0,s1,l0.5 anda1: an opaque, bright red. - Out of range. The hue wraps around (1.25 is the same as 0.25, -0.1 as 0.9), so it can keep increasing. Saturation, lightness and opacity are limited to 0 to 1.
Related nodes
- Color To HSL: the reverse.
- Random Number: a random hue, for random colors of the same brightness.
- Random Color: a fully random color.