Skip to main content

Function: interpolateColorOklab()

interpolateColorOklab(color1, color2, alpha): string

Defined in: src/utils/oklab.ts:183

Interpolate two colors in Oklab space and return the result as a hex string.

This is the perceptual counterpart of interpolateColor. alpha of 0.0 yields color1, 1.0 yields color2. The midpoint stays bright and vivid instead of passing through a muddy linear-RGB blend.

Parameters​

color1​

string

color2​

string

alpha​

number

Returns​

string