(theme: { name: string; variables: { name: string; dark?: string | undefined; base?: string | undefined; summary?: string | undefined; }[]; summary?: string | undefined; scheme?: "dark" | "light" | "dual" | undefined; }, options?: ThemeResolverOptions): ThemeCheckReport import {check_theme} from '@fuzdev/fuz_css/theme_check.js'; Runs the gamut, monotonicity, and contrast gates against a theme, resolving
its authored CSS back to numbers through the resolution core. Report-only:
failures land in entries (with pass: false), inputs that can't be
evaluated land in unchecked, and ok is true only when every entry passes
and nothing is unchecked. Never throws.
Every color a gate reads is looked up by its variable name, so a theme that
authors one directly - a stop (palette_a_50, shade_00, text_max,
border_color_30) or a role (text_color, link_color, border_color) -
is measured at the authored color when it is an oklch(L C H) numeric
literal or an exact var() reference to another color the gates evaluate,
and recorded in unchecked otherwise. An authored color a gate depends on
never passes unread, and one no gate reads stays out of the report.
A contrast subject names what was measured: the default stop while a role
is at its default (text_80 on shade_00), the role once the theme authors
it (text_color on shade_00).
An intent stop that renders the same color as a palette letter's (the default for every intent) folds into that letter's gamut entry rather than duplicating it, so reports for letter-bound themes list fewer subjects than the full letters × intents grid.
theme
the theme to check
options
the compiled caps to check the theme with, as compute_theme_caps returns them
{}returns
ThemeCheckReport