/** * Hand-mirror of game/src/engine/hud/colorMath.ts — the WCAG arithmetic behind * the derived HUD inks. The theme report computes its contrast pairings with * EXACTLY the maths the engine will apply, so a SUBSTITUTED line in the report * is a promise about what will render, not an estimate. * * Mirrored by hand because agent tools cannot import engine source (separate * tsconfig include sets). Drift-checked BEHAVIOURALLY by scripts/ * check-hud-catalog.ts: the gate imports both copies under tsx and compares * their outputs over every preset palette plus adversarial pairs, so a changed * threshold or mix factor on either side goes red in CI. */ export declare function relLuminance(hex: string): number; export declare function contrastRatio(a: string, b: string): number; export declare function mixHex(from: string, to: string, amount: number): string; export declare function readableTextColor(hex: string): string; export declare const ON_SURFACE_MIN_CONTRAST = 3; export declare function inkOnSurface(surface: string, preferred: string): string; export declare const ACCENT_INK_MIN_CONTRAST = 4.5; export declare function accentInkOn(ground: string, accent: string): string | null; export declare function mutedInkOnSurface(surface: string, preferred: string): string;