Skip to content

Add contrast-color() page (accessibility, recommended)#75

Draft
jdevalk wants to merge 1 commit into
mainfrom
standards-scan/contrast-color-2026-07-04
Draft

Add contrast-color() page (accessibility, recommended)#75
jdevalk wants to merge 1 commit into
mainfrom
standards-scan/contrast-color-2026-07-04

Conversation

@jdevalk

@jdevalk jdevalk commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What changed

New spec page: Automatic contrasting colour (accessibility/contrast-color), documenting the CSS contrast-color() function — pass it a <color> and the browser returns whichever of black or white contrasts more, so a dynamic/user-picked/dark-mode background keeps legible text without hard-coded colour pairs or luminance maths in JavaScript.

Also:

  • Changelog entry (type: added, 2026-07-04).
  • relatedSlugs wired on color-contrast, forced-colors, and color-scheme.
  • OG images: new per-page image + the four count-driven images the extra page bumps.

Why now

contrast-color() reached Baseline "newly available" in April 2026 — all three engines now ship it: Safari 26 (Sep 2025), Firefox 146 (Dec 2025), Chrome/Edge 147 (Apr 2026). Verified against MDN BCD (css.types.color.contrast-color). It sits directly beside our existing color-contrast page and is a genuine, shippable modern tool for meeting contrast on dynamic colours.

Primary sources

Status justification

recommended, not required: a site works fine computing contrast by hand or hard-coding pairs, and the function degrades safely (feature-detect with @supports). But a modern site with dynamic colours should reach for it. Not optional because it applies broadly wherever colour is set, not just in niche contexts.

Checks

  • npm run build passes (157 pages indexed); page present at HTML, .md, /llms.txt, and /checklist/.
  • npm run lint + npm run format:check clean.

🤖 Draft opened by the daily standards scan. Do not merge without human review; do not redeploy the MCP Worker (that's a post-merge human step).

New spec page documenting the CSS contrast-color() function, which
returns a legible black/white foreground for a dynamic background —
newly available across all major engines in April 2026 (Safari 26,
Firefox 146, Chrome/Edge 147). Status: recommended.

Wires relatedSlugs on color-contrast, forced-colors, and color-scheme;
adds the changelog entry and OG images (per-page + count-driven).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specification-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: b7a9e07
Status: ✅  Deploy successful!
Preview URL: https://3bd88cc3.specification-website.pages.dev
Branch Preview URL: https://standards-scan-contrast-colo.specification-website.pages.dev

View logs

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