AbstractStaticcubehelixGenerates a Cubehelix color scale function. Returns a function that takes t (0-1) and returns an Rgb color.
Start hue in degrees (0-360)
Number of rotations (e.g., 1.5)
Saturation factor (0 = grayscale, 1 = default,
>1 = super saturated)
Gamma correction (1 = linear, <1 brighter,
>1 darker)
The cubehelix function.
StaticdistinctGenerates a set of visually distinct colors. Ideal for charts, data visualization, and categorization. Uses OKLCH to ensure uniform perceptual brightness.
The number of colors.
Optionalopts: Partial<RandomDistinctOptions>The generation options.
The array of generated colors.
StaticgradientStaticquantizeCreates a discrete scale (quantization).
Unlike scale() which interpolates smoothly between colors,
quantize() splits the domain into segments based on the
number of colors passed and their weights.
Ideally suited for ColorBrewer palettes where distinct categories are preferred over gradients.
The array of colors to use as buckets.
Optionaldomain: number[]The array of weights.
A function that maps t (0-1) to one of the colors.
StaticscaleStaticspline
Color sequence generators.