#ffffff on #fef08a contrast ratio
1.16:1
White text (#ffffff) on a light yellow (Tailwind yellow-200) background (#fef08a) fails every WCAG 2.2 contrast threshold.
Swap: #fef08a on #ffffffLarge text sample
Normal body text in #ffffff on #fef08a. The quick brown fox jumps over the lazy dog.
WCAG 2.2 results
| Normal text — WCAG 1.4.3 AA | 4.5:1 | Fail |
|---|---|---|
| Large text — WCAG 1.4.3 AA | 3:1 | Fail |
| UI components & icons — WCAG 1.4.11 AA | 3:1 | Fail |
| Normal text — WCAG 1.4.6 AAA | 7:1 | Fail |
| Large text — WCAG 1.4.6 AAA | 4.5:1 | Fail |
Nearest passing colours
AA (4.5:1)
AAA (7:1)
How it looks with colour blindness
Simulated with the Machado et al. (2009) model at full severity.
- Aa
Protanopia (no red cones)
1.21:1
- Aa
Deuteranopia (no green cones)
1.15:1
- Aa
Tritanopia (no blue cones)
1.21:1
- Aa
Achromatopsia (no colour)
1.16:1
Try a different pair
Colours
Hex, rgb() or hsl(). Alpha is composited.
Preview
Large heading text
Normal body text at 14 px. The quick brown fox jumps over the lazy dog.
Colour-blindness preview
Simulated with Machado et al. (2009), full severity.
- AaProtanopia (no red cones)1.21:1
- AaDeuteranopia (no green cones)1.15:1
- AaTritanopia (no blue cones)1.21:1
- AaAchromatopsia (no colour)1.16:1
Contrast ratio
1.16:1
| Check | Criterion | Needs | Result |
|---|---|---|---|
| Normal text | 1.4.3 AA | 4.5:1 | Fail |
| Large text | 1.4.3 AA | 3:1 | Fail |
| UI components & graphics | 1.4.11 AA | 3:1 | Fail |
| Normal text | 1.4.6 AAA | 7:1 | Fail |
| Large text | 1.4.6 AAA | 4.5:1 | Fail |
Nearest passing colours
Same hue, lightness adjusted in OKLCH.
AA — 4.5:1
Change text
#6c6c6c · 4.51:1
Change background
#867700 · 4.51:1
AAA — 7:1
Change text
#4f4f4f · 7.03:1
Change background
#675800 · 7.06:1
Large text means at least 24 CSS px, or 18.66 CSS px bold. Ratios are truncated, never rounded, so 4.49:1 is shown as failing 4.5:1.
Questions about this pair
- Is #ffffff on #fef08a accessible?
- No. At 1.16:1 it fails every WCAG 2.2 text contrast threshold, including the 3:1 minimum for large text and UI components.
- What is the contrast ratio of #ffffff and #fef08a?
- 1.16:1, calculated with the WCAG 2.2 relative luminance formula. The ratio is truncated, not rounded, so it never shows a failing pair as passing.
- What colour passes AA on #fef08a?
- #6c6c6c is the closest colour to #ffffff — same hue, adjusted lightness — that reaches 4.5:1 on #fef08a.
Related colour pairs
- Aa 1.03:1#fefce8 on #ffffff · Fails
- Aa 1.03:1#ffffff on #fefce8 · Fails
- Aa 20.30:1#fefce8 on #000000 · AAA
- Aa 20.30:1#000000 on #fefce8 · AAA
- Aa 1.07:1#fef9c3 on #ffffff · Fails
- Aa 1.07:1#ffffff on #fef9c3 · Fails
- Aa 19.55:1#fef9c3 on #000000 · AAA
- Aa 19.55:1#000000 on #fef9c3 · AAA
- Aa 1.16:1#fef08a on #ffffff · Fails
- Aa 18.04:1#fef08a on #000000 · AAA
- Aa 18.04:1#000000 on #fef08a · AAA
- Aa 1.31:1#fde047 on #ffffff · Fails