splitComplementary
Return split-complementary colors: the base color plus the two hues angle degrees either side of its complement, [color, hue + 180 - angle, hue + 180 + angle]. Only the hue changes, and the results are not gamut mapped.
import { splitComplementary } from '@pbroom/color-kit';index.ts:113function splitComplementary( color: Color, , angle?: number,): Color[];Parameters
- angle?
numberdefault30 - Offset from the complement in degrees (default
30)
Returns
Color[]Three colors
Example
import { parse, splitComplementary } from '@pbroom/color-kit';
splitComplementary(parse('oklch(0.7 0.15 30)')).map((c) => c.h); // → [30, 180, 240]