Skip to content

fix(cli): parse color-mix output in contrast audit#2421

Open
miguel-heygen wants to merge 2 commits into
mainfrom
fix/contrast-audit-modern-colors
Open

fix(cli): parse color-mix output in contrast audit#2421
miguel-heygen wants to merge 2 commits into
mainfrom
fix/contrast-audit-modern-colors

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

  • Parse Chromium modern color(srgb ... / alpha) computed-color output in the contrast audit.
  • Preserve support for comma- and space-separated rgb/rgba values and percentages.
  • Keep the standalone creative-skill contrast report in sync, including the documented decorative-text opt-out.
  • Refresh the skills manifest.

Root cause

Current Chrome preserves color-mix(in srgb, X, transparent) as color(srgb r g b / a). The audit parser recognized only rgb()/rgba(); every other computed color silently became opaque black, so audit diagnostics disagreed with the rendered pixels.

Tests

  • Browser reproduction confirms Chrome returns color(srgb 1 0 0 / 0.5).
  • Exact red/green audit regression: prior foreground rgb(0,0,0), fixed foreground rgb(255,128,128) over white.
  • Contrast/layout browser suite: 65 passed.
  • Full CLI suite: 1,746 passed, 2 skipped.
  • CLI typecheck, formatting, lint, diff check, and pre-commit checks passed.

Human review is required; this PR is not self-approved or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant