/**
 * @file contrast.ts
 * @input CSS color strings (hex, rgb()/rgba()) or parsed RGBA values
 * @output WCAG 2.x relative luminance and contrast ratios
 * @position Theme utility; consumed by expandColorScale.ts and theme tests
 *
 * Dependency-free WCAG 2.x contrast math. Backs the contrast guarantees
 * for generated color tokens (WCAG 1.4.3 text contrast >= 4.5:1,
 * WCAG 1.4.11 non-text contrast >= 3:1).
 *
 * Semi-transparent foregrounds are composited over their backdrop in
 * gamma-encoded sRGB space (matching CSS alpha compositing) before the
 * ratio is measured — a translucent token has no contrast of its own,
 * only against what it renders on.
 */
import type { RGBA } from '../utils/color';
/**
 * WCAG 2.x relative luminance of an sRGB color (alpha ignored).
 * 0 = black, 1 = white.
 *
 * https://www.w3.org/WAI/WCAG22/Techniques/general/G18
 */
export declare function relativeLuminance(color: RGBA): number;
/**
 * Composite a (possibly translucent) foreground over an opaque backdrop
 * using standard source-over alpha blending in gamma-encoded sRGB space,
 * matching how CSS paints translucent tokens. Returns an opaque color.
 */
export declare function compositeOver(foreground: RGBA, backdrop: RGBA): RGBA;
/**
 * WCAG 2.x contrast ratio between a foreground and an opaque background.
 * Returns a value in [1, 21].
 *
 * A translucent foreground is composited over the background first.
 * A translucent background is rejected — composite it over its own
 * backdrop before calling, since its rendered color is unknowable here.
 *
 * @example
 * ```
 * contrastRatio('#000000', '#FFFFFF'); // 21
 * contrastRatio('#0D131A', '#FCFDFE') >= 4.5; // text-on-surface check
 * ```
 */
export declare function contrastRatio(foreground: string | RGBA, background: string | RGBA): number;
//# sourceMappingURL=contrast.d.ts.map