([r, g, b]: RgbUnit): number import {srgb_relative_luminance} from '@fuzdev/fuz_css/wcag.js'; Computes WCAG 2.x relative luminance of a gamma-encoded sRGB color.
__0
type RgbUnit
returns
number WCAG 2.x relative luminance and contrast ratio.
Design-time and test use only, like oklch.ts — these power the contrast gates that assert readable default pairings (body text on surfaces, links, focus outlines) across the derived palette.
2 declarations
([r, g, b]: RgbUnit): number import {srgb_relative_luminance} from '@fuzdev/fuz_css/wcag.js'; Computes WCAG 2.x relative luminance of a gamma-encoded sRGB color.
__0number (a: RgbUnit, b: RgbUnit): number import {wcag_contrast_ratio} from '@fuzdev/fuz_css/wcag.js'; Computes the WCAG 2.x contrast ratio between two gamma-encoded sRGB colors, in [1, 21] regardless of argument order.
abnumber