Kerbly

Yellow #ffff00 on blue #0000ff: 8:1 contrast

A strong pairing for headings on dark blue.

Your colours

#ffff00 · rgb(255, 255, 0) · hsl(60, 100%, 50%)

#0000ff · rgb(0, 0, 255) · hsl(240, 100%, 50%)

Try an example

Result

8:1

Passes AAA for normal text

Contrast ratio 8 to 1. Passes AAA for normal text.

  • AA, normal text

    Needs 4.5:1 · Body text and most labels. The level most laws and policies ask for.

    Pass
  • AA, large text

    Needs 3:1 · Text from 24px, or 18.66px and bold.

    Pass
  • AAA, normal text

    Needs 7:1 · The enhanced level. Worth aiming for on long reading.

    Pass
  • AAA, large text

    Needs 4.5:1 · Large text at the enhanced level.

    Pass
  • Buttons, icons and borders

    Needs 3:1 · Parts of controls and graphics you need to see (WCAG 2.2, 1.4.11).

    Pass

Fix it: the closest colours that pass

Same hue, smallest change. Pick one to try it in the preview above.

Your colours already reach AA for normal text. Nothing to change.

How it looks with colour-blindness

About 1 in 12 men and 1 in 200 women have some form of colour-vision deficiency. These previews are an approximation, and the ratio is measured on the simulated colours.

  • Protanopia

    No red cones. Reds look dark and muddy.

    4.7:1AA
  • Deuteranopia

    No green cones. The most common type.

    6.2:1AA
  • Tritanopia

    No blue cones. Rare. Blues and yellows blur together.

    5.22:1AA
  • Greyscale

    No colour at all. Only lightness is left.

    8.02:1AA

The short answer

Yellow #ffff00 on blue #0000ff has a contrast ratio of 8:1. That is above the 7:1 needed for AAA, so it passes WCAG for normal text, large text and the visible parts of buttons and icons.

A stricter option (AAA, 7:1)

If you want to reach AAA for long reading, these are the closest changes that keep the same hue.

Questions about this pair

Is yellow #ffff00 on blue #0000ff accessible?

Yellow #ffff00 on blue #0000ff has a contrast ratio of 8:1. That is above the 7:1 needed for AAA, so it passes WCAG for normal text, large text and the visible parts of buttons and icons.

Can I use yellow #ffff00 on blue #0000ff for body text?

Yes. At 8:1 it meets the 4.5:1 that WCAG AA asks for on normal text.

Can I use it for large headings, buttons or icons?

Yes. Large text and the visible parts of buttons, icons and borders need 3:1, and this pair has 8:1. Keep small text on other colours.

Other combinations people check

Open the full contrast checker to test your own colours or a whole palette.

See how your whole site does

A free scan checks every page element against WCAG 2.2, colours included, and explains each fix in plain English.

No account needed. Takes about 30 seconds.