laneColor
A distinct CSS colour for lane `index` (0-based), from the theme, in light and dark: - 0–4: the chart tokens, `hsl(var(--chart-1))` to `--chart-5`; - 5–9: the same five deepened toward `--foreground` (35%): darker on a light theme, lighter on a dark one, so they gain contrast against the background rather than lose it; - 10–49: each chart token blended with another (60/40, in OKLCH), plain then deepened, through all four partners; - 50 on: the same fifty, a step further toward the foreground each round (never reaching it). The same index always gives the same colour, and no two indexes give the same one. Past a handful, colours alone stop telling lanes apart, which is why a calendar names every lane too. ```tsx const lanes = people.map((p, i) => ({ key: p.id, label: p.name, color: laneColor(i) })); ```
packages/ui/src/components/data/calendar/lane-color.ts
@marktiderman/genesis-ui/dataimport { laneColor } from "@marktiderman/genesis-ui/data";react-docgen-typescript.laneColor
A distinct CSS colour for lane `index` (0-based), from the theme, in light and dark: - 0–4: the chart tokens, `hsl(var(--chart-1))` to `--chart-5`; - 5–9: the same five deepened toward `--foreground` (35%): darker on a light theme, lighter on a dark one, so they gain contrast against the background rather than lose it; - 10–49: each chart token blended with another (60/40, in OKLCH), plain then deepened, through all four partners; - 50 on: the same fifty, a step further toward the foreground each round (never reaching it). The same index always gives the same colour, and no two indexes give the same one. Past a handful, colours alone stop telling lanes apart, which is why a calendar names every lane too. ```tsx const lanes = people.map((p, i) => ({ key: p.id, label: p.name, color: laneColor(i) })); ```
No declared props.