scales library

Radix color scales reference data

This file contains pre-built color scales from Radix UI Colors that seed the color generation algorithm. These scales serve as templates for creating custom color scales.

The generation process uses these templates as follows:

  1. Finds the two closest template scales using ΔE_OK (perceptual color difference)
  2. Blends the templates using trigonometry to determine the optimal mixing ratio
  3. Corrects hue and chroma to match the source color identity
  4. Transposes the lightness curve to anchor to the target background

Each scale has 12 steps (1-12) in both light and dark modes, stored as P3 color strings for accurate template matching.

Format: Map<scaleName, List

See FlyColorGenerator for the complete generation algorithm.

Constants

allScaleNames → const List<String>
All scale names (gray + colored)
grayScaleNames → const List<String>
Gray scale names (used for special handling)
radixDarkScalesP3 → const Map<String, List<String>>
Dark mode Radix color scales (P3) Key: scale name, Value: List of 12 P3 color strings (steps 1-12) Format: "color(display-p3 r g b)" where r, g, b are in 0-1 range
radixLightScalesP3 → const Map<String, List<String>>
Light mode Radix color scales (P3) Key: scale name, Value: List of 12 P3 color strings (steps 1-12) Format: "color(display-p3 r g b)" where r, g, b are in 0-1 range