Home▸Game Development▸WCAG Text Contrast Ratio: Relative Luminance, sRGB Gamma and AA/AAA Thresholds

WCAG Text Contrast Ratio: Relative Luminance, sRGB Gamma and AA/AAA Thresholds

Mix text and background colours and read their WCAG contrast ratio from relative luminance, with sRGB gamma linearisation, text opacity and size deciding the AA and AAA pass marks. A probe sign sweeps text lightness from black to white to show where the ratio crosses 3, 4.5 and 7, and equal-luminance red and green pairs show why hue alone does not give contrast. A Blender-built wall and signs, with numerical checks of the luminance formula built in.

Game Development3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
WCAG Text Contrast Ratio: Relative Luminance, sRGB Gamma and AA/AAA Thresholds ↗ Open standalone

Mix text and background colours and read their WCAG contrast ratio from relative luminance, with sRGB gamma linearisation, text opacity and size deciding the AA and AAA pass marks. A probe sign sweeps text lightness from black to white to show where the ratio crosses 3, 4.5 and 7, and equal-luminance red and green pairs show why hue alone does not give contrast. A Blender-built wall and signs, with numerical checks of the luminance formula built in.

⚙ Under the hood

Mix text and background colours and read their WCAG contrast ratio from relative luminance, with sRGB gamma linearisation, text opacity and size deciding the AA and AAA pass marks. A probe sign sweeps text lightness from black to white to show where the ratio crosses 3, 4.5 and 7, and equal-luminance red and green pairs show why hue alone does not give contrast. A Blender-built wall and signs, with numerical checks of the luminance formula built in.

SimLabAccessibilityTestingWCAGContrast RatioLuminanceColour Design

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)