/** * WCAG 2.x contrast ratio utilities (pure, deterministic). */ export interface Color { r: number; g: number; b: number; a: number; } /** * Parse a color string into RGBA components. * Handles: #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), hsla() * (both comma-separated and CSS Color Level 4 space-separated), and named colors. * Returns null if unparseable. */ export declare function parseColor(s: string): Color | null; /** * Calculate relative luminance per WCAG 2.x sRGB. * Input: { r: 0-255, g: 0-255, b: 0-255 } * Output: 0-1 (0=black, 1=white) */ export declare function relativeLuminance(c: { r: number; g: number; b: number; }): number; /** * Calculate WCAG contrast ratio between two colors. * Returns null if either color is unparseable or has alpha < 1. * Otherwise returns contrast ratio (1-21). */ export declare function contrastRatio(fg: string, bg: string): number | null;