Formula & Mathematical Methodology
Human eyes are far more sensitive to green and red light than blue light—Notice the ITU-R BT.709 luminance weights (`0.7152 Green`, `0.2126 Red`, `0.0722 Blue`). Because yellow and light amber contain high green channel values, their luminance is very close to white (`1.0`), making white text or light yellow focus rings on cream backgrounds fail contrast checks.
Contrast Ratio = (L_lighter + 0.05) / (L_darker + 0.05) | L = 0.2126·R + 0.7152·G + 0.0722·B
- L — Relative luminance of a linearized sRGB color (0.0 for pure `#000000` black to 1.0 for pure `#FFFFFF` white).
- 4.5 : 1 — WCAG 2.1 Level AA minimum contrast for normal body text (<24px regular or <18.66px bold).
- 3.0 : 1 — WCAG 2.1 Level AA minimum for large text (>=24px or >=18.66px bold) and SC 1.4.11 non-text UI components/focus rings.
- 7.0 : 1 — WCAG 2.1 Level AAA enhanced contrast standard for long-form editorial reading.
Step-by-Step Worked Example
Scenario: A designer checks ATIV's primary body ink `#1C1814` against the warm cream background `#FAF6EE` at 17px regular text, and compares it against white `#FFFFFF` on mid-amber `#B07B2E` at 14.5px bold.
- `#1C1814` luminance = 0.0097; `#FAF6EE` luminance = 0.9131 → Contrast = (0.9131 + 0.05) / (0.0097 + 0.05) = 16.13 : 1 (Passes AA & AAA).
- `#FFFFFF` (L = 1.0000) on `#B07B2E` (L = 0.2361) → Contrast = 1.05 / 0.2861 = 3.67 : 1 (FAILS 4.5:1 AA for 14.5px bold text).
- Darkening `#B07B2E` to `#7D5214` lowers background luminance to 0.1045, raising white-text contrast to 6.80 : 1 (Passes AA).
Key Takeaway: Testing badge and focus-ring colors against exact sRGB luminance equations prevents invisible keyboard focus states and low-contrast UI labels.
Practical Operator & Planning Tips
- Always verify `:focus-visible` keyboard focus outlines against the page background under WCAG 2.1 SC 1.4.11 (minimum 3.0:1 contrast)—use deep brick `#9E331E` or ink `#1C1814` on light paper backgrounds instead of pale yellow.
- Remember the exact CSS pixel threshold for 'Large Text': 18pt equals `24px` at regular weight, and 14pt bold equals `18.66px` (`~19px`) at `font-weight: 700`.
- Test muted/secondary caption colors (`--muted`) on both your primary background AND your shaded card/footer surfaces—a gray that passes on pure `#FFFFFF` often drops below 4.5:1 on warm `#F3EADA` panels.
- Never rely on color alone to convey pass/fail or positive/negative financial metrics; always pair color badges with explicit text labels or `+`/`−` symbols.
Frequently Asked Questions
What is the minimum contrast ratio required for WCAG 2.1 Level AA compliance?
Normal body text requires at least 4.5:1 contrast, large text (24px+ regular or 18.66px+ bold) requires at least 3.0:1, and interactive UI borders, icons, and focus indicators require at least 3.0:1.
Why does 14.5px bold text require 4.5:1 instead of the 3.0:1 large-text rule?
WCAG defines large bold text as 14 points (14pt), and in CSS 1pt = 1.333px (96/72), meaning bold text must be at least 18.66px (19px) to qualify for the 3.0:1 large-text threshold.
Do placeholder text and disabled buttons have to pass 4.5:1?
Disabled controls are exempt under WCAG 1.4.3, but visible form labels and default input values must pass 4.5:1 so users with low vision or bright-sunlight screens can read them.