/** Extract { r, g, b } (0–255) from a hex string or RGBA-like object. */ export declare function rgb(raw: unknown): { r: number; g: number; b: number; } | null; /** HSL saturation of an RGB color (0–1). */ export declare function saturation(r: number, g: number, b: number): number; /** * If the colour's saturation exceeds `maxSat`, pull it toward grey * until saturation drops to maxSat. Returns a hex string. */ export declare function desaturateTo(raw: unknown, maxSat: number, fallback: string): string; /** Darken a hex colour by multiplying each channel by `factor` (0–1). */ export declare function dimColor(hex: string, factor?: number): string; export declare const FALLBACK: { readonly primary: "#8B9DAF"; readonly text: "#C5C5BB"; readonly muted: "#7A7A72"; readonly success: "#9CAF8B"; readonly warning: "#C5B88D"; readonly error: "#B08A8A"; readonly border: "#6B6B63"; }; /** * Desaturation ceiling for the Morandi-style palette. * * Morandi colours float around 0.15–0.30 saturation in HSL space. * 0.28 sits near the upper end of that range: it strips the aggressive * punch from high-saturation themes (Dracula, Solarized …) while * preserving enough colour identity that green / orange / red hit-rate * coding stays distinguishable. * * Lower → more grey, harder to tell colours apart. * Higher → bright themes bleed through and defeat the muted look. */ export declare const MAX_SAT = 0.28;