ApasScript.

Colors

rgb

A colour from red, green and blue channels, each 0-255 (out-of-range values are clamped). The result is colour text such as "#ff1124", usable anywhere a colour is: draw(), penColor(), plot(), ...

rgba

rgb() with an opacity a from 0 (transparent) to 1 (opaque); the result is "#rrggbbaa".

hsl

A colour from hue (degrees round the colour wheel: 0 red, 120 green, 240 blue), saturation and lightness (both in percent, 0-100) -- CSS hsl(h, s%, l%).

hsla

hsl() with an opacity a from 0 to 1.

mix

The colour t of the way from c1 (t = 0) to c2 (t = 1), mixed in sRGB like CSS color-mix().

lighter

The colour with its HSL lightness raised by p percentage points.

darker

The colour with its HSL lightness lowered by p percentage points.

withAlpha

The same colour with opacity a (0 transparent, 1 opaque).

rainbow

A list of n evenly spaced hues (full saturation, lightness 50%), starting at red.