export interface GlassRgb { r: number; g: number; b: number; } export declare const normalizeHexColor: (input: string) => string; export declare const hexToRgb: (input: string) => GlassRgb; export declare const rgbToHex: ({ r, g, b }: GlassRgb) => string; export declare const mixHex: (from: string, to: string, amount: number) => string; export declare const relativeLuminance: (input: string) => number; export declare const contrastRatio: (foreground: string, background: string) => number; export declare const bestTextColor: (background: string, light?: string, // @ag-literal-allowed: color-math dark?: string) => string; export interface Oklch { l: number; c: number; h: number; alpha?: number; } export interface Srgb { r: number; g: number; b: number; alpha?: number; } /** Oklch -> sRGB channel floats 0..1 (may exceed gamut before mapping). */ export declare const oklchToSrgbRaw: (color: Oklch) => [number, number, number]; /** sRGB (0..1) -> Oklch. */ export declare const srgbToOklch: (input: Srgb | [number, number, number]) => Oklch; /** CSS Color 4 gamut mapping: binary-search chroma reduction holding L,H. * Guaranteed within dEOK < 0.02 of the CSS reference algorithm's result * for the token/theme domain. */ export declare const oklchToSrgb: (color: Oklch) => Srgb & { inGamut: boolean; }; /** Parse hex / rgb() / hsl() / oklch() into Oklch. */ export declare const parseColor: (input: string | Oklch) => Oklch; /** WCAG 2.2 contrast ratio between two colors (any parseable input). */ export declare const wcagContrast: (a: string | Srgb | Oklch, b: string | Srgb | Oklch) => number; /** source-over composite: fg (with alpha) over opaque bg, returning opaque sRGB. */ export declare const compositeOver: (fg: string | Srgb | Oklch, bg: string | Srgb | Oklch) => Srgb; /** Advisory APCA Lc (W3 formula, polarity-aware). Positive = dark text on light bg. */ export declare const apcaLc: (text: string | Srgb | Oklch, background: string | Srgb | Oklch) => number; /** Serialize Oklch as a CSS color string. Lives here because `oklch(` literals * are only allowed in this file (MAT-056 line allowance). */ export declare const formatOklch: (o: Oklch) => string; /** Serialize a light/dark pair as `light-dark(, )`. */ export declare const formatLightDark: (light: string, dark: string) => string; /** @supports query probing relative-color syntax (oklch(from ...) support). */ export declare const RELATIVE_OKLCH_QUERY = "color: oklch(from red l c h)"; /** CIEDE2000 colour difference. */ export declare const deltaE2000: (a: string | Srgb | Oklch, b: string | Srgb | Oklch) => number; //# sourceMappingURL=color.d.ts.map