Contrast ratios in WCAG context
PageKit computes the contrast ratio between two opaque sRGB hex colors using relative luminance as described in WCAG 2.x guidance for contrast. Each channel is linearized, combined with coefficients 0.2126, 0.7152, and 0.0722, then the ratio (L1 + 0.05) / (L2 + 0.05) is formed with the lighter luminance on top. The page reports common text thresholds: roughly 4.5:1 for AA normal text, 3:1 for AA large text, and 7:1 for AAA normal text. Those labels are calculational hints—not a certification that your product meets accessibility requirements.
Useful scenarios
- Checking body text against a flat card background during early design.
- Comparing two candidate greys before a UI review.
- Teaching why the same blue fails on charcoal but passes on white.
- Spotting a low-contrast placeholder before customer QA.
- Documenting a ratio next to a design token proposal.
What this check does not cover
Translucent overlays, background images, gradients, text shadows, focus rings, non-text contrast for controls, color blindness simulations, and organizational compliance audits are out of scope. A “Pass” hint on AA normal text does not mean the whole interface is accessible. Always evaluate real components in context.
Worked example
Foreground #111111 on background #ffffff yields a high ratio well above 7:1 in typical sRGB computation. Foreground #777777 on #ffffff often lands near the AA boundary—verify with the live calculator rather than memorizing a single grey. If you change only the brand hue and keep lightness similar, re-check pairs that sit on colored surfaces, not only on white.
Common mistakes
- Testing on pure white when the shipping UI uses a tinted canvas.
- Treating AA/AAA hints as a legal certification stamp.
- Ignoring large-text versus normal-text threshold differences.
- Checking a logo mark with rules meant for body copy alone.
Limits
Opaque hex pairs only. Educational calculation aid for designers and developers. It does not replace a full WCAG evaluation, assistive-technology testing, or formal conformance claims.
Why mention WCAG without certifying?
The math aligns with common contrast guidance, but conformance depends on the whole product and process.
Do alpha channels work?
Not on this page—flatten to opaque hex first or test in a tool that models compositing.
Need a correction?
Contact PageKit with both hex values and the ratio you expected.

