@pbroom/color-kitInterpolation
InterpolationSpace
Color space to interpolate in.
import type { InterpolationSpace } from '@pbroom/color-kit';index.ts:48type InterpolationSpace =
| 'oklch'
| 'oklab'
| 'srgb'
| 'linear-srgb'
| 'display-p3'
| 'linear-p3';| Value | CSS color-mix(in …) | Kind | | --------------- | --------------------- | --------------------------- | | 'oklch' | oklch | polar (hue option applies) | | 'oklab' | oklab | rectangular | | 'srgb' | srgb | rectangular, gamma-encoded | | 'linear-srgb' | srgb-linear | rectangular, linear light | | 'display-p3' | display-p3 | rectangular, gamma-encoded | | 'linear-p3' | display-p3-linear | rectangular, linear light |
The two linear-light spaces are linear transforms of each other, so they produce the same mix (to float precision); both are offered so callers can name the space their renderer works in.