/** A color in OKLCH: lightness 0–1, chroma 0–~0.37, hue in degrees. */ export interface Oklch { l: number; c: number; h: number; } type Vec3 = [number, number, number]; /** An RGB space the generator writes into. Both gamma-encode as sRGB does. */ export type Gamut = 'srgb' | 'p3'; /** Parses `#rgb`, `#rrggbb`, `oklch(L C H)` (L as 0–1 or a percentage) or * `color(display-p3 r g b)`, or returns null. */ export declare function parseColor(input: string): Oklch | null; /** Like `parseColor`, for colors the code itself wrote. */ export declare function oklch(input: string): Oklch; export declare function toOklab({ l, c, h }: Oklch): Vec3; export declare function fromOklab([l, a, b]: Vec3): Oklch; /** The color that gamma-encoded channels in a gamut show. */ export declare function fromRgb(rgb: Vec3, gamut?: Gamut): Oklch; /** The distance between two colors in OKLab (ΔEOK). */ export declare function deltaE(a: Oklch, b: Oklch): number; /** About one just-noticeable difference in ΔEOK, as CSS Color 4 uses it. */ export declare const JND = 0.02; /** CSS Color 4's gamut mapping: lower chroma at fixed lightness and hue until * clipping the rest is no longer noticeable. Returns channels, 0–1. */ export declare function gamutMap(color: Oklch, gamut?: Gamut): Vec3; /** The sRGB hex a color shows as, gamut-mapped. */ export declare function toHex(color: Oklch): string; /** A color's display-p3 channels, gamut-mapped and rounded as `toP3` writes them. */ export declare function p3Channels(color: Oklch): Vec3; /** `color(display-p3 …)` of a color, gamut-mapped into display-p3, with an optional alpha. */ export declare function toP3(color: Oklch, alpha?: number): string; /** The color a generated color shows as in a gamut. */ export declare function rendered(color: Oklch, gamut?: Gamut): Oklch; /** Part of the way from `a` to `b`, interpolated in OKLab. */ export declare function mixOklab(a: Oklch, b: Oklch, t: number): Oklch; /** `rgba()` of a hex color at an alpha. */ export declare function withAlpha(hex: string, alpha: number): string; /** A color written as a hex, or an `rgba()` over a backdrop, as the hex it shows as. */ export declare function composite(color: string, backdrop: string): string; export {};