Add Contrast Checker tool - #15
Merged
Merged
Conversation
A single-file, fully-offline WCAG contrast checker: pick a text and background colour (native swatch or hex), see the contrast ratio, per-level AA/AAA pass/fail badges for normal text, large text, and UI/graphics, and a live preview of the pairing. - Follows the Hillnote design system: azure accent, Manrope 900 display, Inter body, 24px card radius, surface-contrast elevation. - Supports light and dark mode via prefers-color-scheme; all UI chrome is token-driven, while the preview intentionally renders the user's chosen colours (the content being tested). - Persists the last pairing in localStorage under a namespaced key. - Registered in tools.json (version 1) with catalogVersion bumped to 25; screenshot added; npm run validate passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B8qK6taiCzKs68frzZakYN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this tool?
Contrast Checker — pick a text colour and a background colour (native swatch or hex), and instantly see the WCAG contrast ratio, per-level AA/AAA pass/fail badges, and a live preview of the pairing. It's for writers and note-takers choosing readable colours for notes, highlights, callouts, and docs — and it's a natural fit for a catalog whose own design system is built around WCAG contrast ratios.
Checklist
contrast-checker/index.htmlwith all CSS + JS inline.fetch, orimport. Pure math (relative luminance), no assets.screenshots/contrast-checker.webp(vianpm run screenshot contrast-checker).tools.json(dirmatches the folder name).catalogVersion(24 → 25).versionis1.npm run validatepasses locally (30 tools, no warnings).Notes for reviewers
prefers-color-scheme: dark.Generated by Claude Code