Skip to content

ColorOptions

Defined in: src/color.ts:8

optional alpha?: true | Span

Defined in: src/color.ts:22

Opacity in [0, 1].

Left out, colours are opaque and no alpha appears in the output. Pass true for a fully random opacity, a number to fix it, or a span to draw from a band.


optional format?: "hex" | "rgb" | "hsl"

Defined in: src/color.ts:24

Which notation color returns. Defaults to hex.


optional hue?: Span

Defined in: src/color.ts:10

Hue in degrees, [0, 360]. Defaults to the whole wheel.


optional lightness?: Span

Defined in: src/color.ts:14

Lightness in [0, 1]. Defaults to [0.35, 0.65].


optional saturation?: Span

Defined in: src/color.ts:12

Saturation in [0, 1]. Defaults to [0.45, 0.9].