/** * Text colours a gradient cell may take. * * Not `--base-foreground`: the background here is a fixed colour that does not * follow the theme, so a foreground that flipped with it would be readable in * one theme and not the other. * * Not the grey palette tokens either, and that is the awkward part. Two fixed * candidates can only guarantee 4.5:1 against an arbitrary background if their * contrast with each other is at least 4.5² — which is to say pure black and * white. `gray-900`/`gray-50` tops out at 4.12:1 on mid-tones and `gray-950`/ * white at 4.48:1, both short of SC 1.4.3. Since a user may pick any gradient * colour, the guarantee is worth more here than palette purity. */ export declare const CONDITIONAL_FORMATTING_FOREGROUND_ON_LIGHT = "#000000"; export declare const CONDITIONAL_FORMATTING_FOREGROUND_ON_DARK = "#ffffff"; /** * WCAG relative luminance of a hex colour, 0 (black) to 1 (white). * * @see https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html */ export declare const getRelativeLuminance: (hex: string) => number; /** * Picks the text colour that stays readable on `backgroundColor`. * * A gradient rule only ever sets a background, so without this the text keeps * the inherited theme foreground — and the shipped default red ramp lands at * 2.1:1 on its dark end in the light theme and 1.2:1 on its light end in the * dark theme, well under the 4.5:1 that SC 1.4.3 asks for. The worst case here * is 4.58:1, whatever colour the user picks. */ export default function getConditionalFormattingReadableForeground(backgroundColor: string): string;