Skip to content

charton API


charton API / @chart-on/ui / index / defaultSwatches

Variable: defaultSwatches ​

const defaultSwatches: readonly string[]

Defined in: ui/src/color-control.ts:17

Default swatches, read row by row in a grid of SWATCH_COLUMNS.

Rule: the first row is neutral, OKLCH lightness 1 − 0.08·i for i = 0…8, then black. Each later row is one lightness, 0.92 − 0.08·r for r = 0…6 (lightest first), across ten hues 36° apart from 25°, so each column is one hue. Chroma is 0.2, reduced only as far as needed to stay inside sRGB. Values are rounded to #rrggbb.