Skip to content
/
Suscribirse Subscribe

Detrás del telón hay sistemas, no magia. Arquitectura de software, IA y computación de bajo nivel para las trincheras de producción.

Behind the curtain there are systems, not magic. Software architecture, AI, and systems engineering from the production trenches.

WCAG 2.1 AA / AAA CONTRAST CHECKER + HEX · RGB · HSL · OKLCH CONVERTER

Check accessible WCAG 2.1 contrast ratios between foreground text and background in real time, preview typography live, and copy calibrated HEX, RGB, HSL, and CSS OKLCH color tokens locally in browser RAM.

Sample Large Heading Preview (20px Bold · WCAG Large)
Standard body copy paragraph (15px Normal). Verify right away whether your foreground/background pair passes WCAG AA (4.5:1) or strict AAA (7.0:1).
Contrast ratio
—
Normal text AA (≥ 4.5:1)
—
Normal text AAA (≥ 7:1)
—
Large text / UI (≥ 3:1)
—

Official W3C Relative Luminance & Contrast Formula (WCAG 2.1)

Accessibility audits under the EU Accessibility Act and W3C WCAG 2.1 compute perceptual legibility by first linearizing sRGB gamma curves for each 8-bit channel:

For each channel C in {R, G, B} / 255:
C_lin = C / 12.92 if C ≤ 0.04045 else ((C + 0.055) / 1.055)^2.4
Relative Luminance: L = 0.2126 × R_lin + 0.7152 × G_lin + 0.0722 × B_lin
Contrast Ratio: CR = (max(L1, L2) + 0.05) / (min(L1, L2) + 0.05) [range 1:1 to 21:1]

Required Minimum Thresholds in Web UI

WCAG Level Minimum Ratio Covered UI Elements Engineering Rule of Thumb
AA (Normal Text) ≥ 4.5 : 1 Body copy, inputs, captions (< 18pt / 14pt bold) Legal compliance baseline across EU & US public sites
AA (Large Text & UI) ≥ 3.0 : 1 Headings ≥ 24px (or 18.66px bold), input borders & icons Never ship faint low-contrast borders on forms
AAA (Normal Text) ≥ 7.0 : 1 Long-form technical articles & high-legibility dark UIs Target ≥ 7:1 for developer docs and calculators

Frequently Asked Questions

Why convert to CSS oklch() alongside HEX, RGB, and HSL?

Legacy HSL assigns wildly different perceived brightness to yellow versus blue at identical lightness (L%). Perceptually uniform oklch() keeps visual contrast predictable when building light/dark design tokens.

Which other local client-side tools pair well with this workflow?

Optimize icons and brand SVGs in memory with our Private SVG to PNG & WebP Converter, or draft documentation with our Private Markdown to HTML & SEO Word Counter.

Suscribirse Subscribe