Chart Color Audit

v0.4.0
io.github.socraticstatic/chart-color-audit Checked 16 hours ago Published 14 days ago

CI-friendly accessibility audit for chart color palettes: WCAG contrast, CVD simulation, OKLab ΔE.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

audit_palette Audit a chart color palette

Audit chart colors for accessibility: pairwise OKLab ΔE separation under normal vision, deuteranopia, protanopia, tritanopia (published Machado 2009 matrices) and grayscale, plus WCAG 2.2 SC 1.4.11 non-text contrast (≥3:1) against the background. Returns per-vision findings with human-word bands and a pass/fail verdict with reasons.

ParameterTypeDescription
background *stringBackground color the chart marks render on.
colors *arrayPalette colors in slot order — any CSS color syntax (#hex, hsl(), rgb(), named).
modestringFloors preset. perceptual (default) fails what an eye can't tell apart (ΔE<2); redundant-encodings for palettes paired with dash/decal/shape channels; strict demands clear separation.

audit_tokens Audit chart tokens from a config file

Run the same audit against a chartaudit.config.json on disk — the config names a CSS or design-tokens file plus which tokens are the categorical palette, background, and semantic roles. A config that declares themes (light and dark, say) returns a verdict over all of them plus each theme's result.

ParameterTypeDescription
config_path *stringAbsolute or cwd-relative path to chartaudit.config.json.