analogous
Return analogous colors (neighbors on the OKLCH hue wheel): [hue - angle, color, hue + angle]. Only the hue changes, and the results are not gamut mapped.
import { analogous } from '@pbroom/color-kit';index.ts:48function analogous( color: Color, , angle?: number,): Color[];Parameters
- angle?
numberdefault30 - Hue offset in degrees (default
30)
Returns
Color[]Three colors
Example
import { analogous, parse } from '@pbroom/color-kit';
analogous(parse('oklch(0.7 0.15 30)')).map((c) => c.h); // → [0, 30, 60]