API documentation
| Module | Description |
|
color.alpha
|
Straight-alpha and premultiplied color values.
|
|
color.composite
|
Alpha compositing for premultiplied linear-light sRGB.
|
|
color.difference
|
Measure perceptual distance between Oklab colors.
|
|
color.gamut
|
Diagnose and handle colors outside the sRGB gamut.
|
|
color.interpolate
|
Color interpolation with explicit color-space and hue semantics.
|
|
color.oklab
|
Oklab values and conversion to and from CIE XYZ D65.
|
|
color.oklch
|
OKLCH values, degree-based hue handling, and component replacement.
|
|
color.rgb
|
Encoded and linear-light sRGB values.
|
|
color.tone
|
Build raw OKLCH tone schedules without imposing palette policy.
|
|
color.wcag
|
Measure WCAG 2 relative luminance and contrast for sRGB.
|
|
color.xyz
|
CIE XYZ values referenced to D65 and conversions to and from linear-light sRGB.
|
|
color
|
Public entry module for color-d.
|