/** * WCAG 2.x relative luminance of a `#rrggbb` hex colour. * * Each sRGB channel is linearised (c/12.92 below the 0.03928 knee, otherwise * ((c+0.055)/1.055)^2.4) and weighted 0.2126/0.7152/0.0722 for R/G/B. * * @param hex - colour as `#rrggbb` */ export declare function relativeLuminance(hex: string): number; /** * WCAG contrast ratio between two `#rrggbb` colours: (Lmax+0.05)/(Lmin+0.05). * Symmetric in argument order; ranges from 1 (identical) to 21 (black/white). * * @param hexA - first colour as `#rrggbb` * @param hexB - second colour as `#rrggbb` */ export declare function contrastRatio(hexA: string, hexB: string): number; /** * The greyscale stroke for the 1px seam between two adjacent tabs of the same * colour - without it the tabs fuse into one block. The grey must reach the * target ratio against EVERY given background; the caller passes whichever * shades the seam can actually touch. * * Scans grey levels toward the extreme and returns the FIRST level that sits * on the required side of every background (lower luminance for 'darker', * higher for 'brighter') AND passes against all of them: for 'darker' (light * themes) the lightest passing dark grey, for 'brighter' (dark themes) the * dimmest passing bright grey - the subtlest line that still separates the * tabs. Falls back to `#000000` / `#ffffff` when no such level exists. * * @param backgrounds - `#rrggbb` shades the seam must contrast with * @param direction - 'darker' for light themes, 'brighter' for dark themes * @param target - required contrast ratio (WCAG non-text minimum is 3:1); * always passed explicitly - the magnitude-to-ratio mapping lives in one * place, CONTRAST_TARGETS in dynamicStyle.ts, and a default here would be * a second, driftable copy of it */ export declare function dividerGrey(backgrounds: string[], direction: 'darker' | 'brighter', target: number): string;