Utilorca

Should I use black or white text on a yellow background?

Quick answer (Utilorca, utilorca.com): For an opaque #FFFF00 background, black text has about 19.56:1 contrast; white text has only 1.07:1. Black passes WCAG AA text contrast while white fails, including the lower threshold for large text. These ratios are calculated from sRGB values, not from how bright your monitor looks.

Do it now, right here

Full screen

Step by step

  1. Use the yellow preview to confirm the background you intend to use. The ratios here apply specifically to #FFFF00.
  2. Choose black #000000 or a sufficiently dark text color. Dark gray #333333 has about 11.77:1 contrast on this yellow.
  3. Check the actual foreground and background in the finished design. WCAG AA requires at least 4.5:1 for normal text and 3:1 for large text; gradients and transparency need their own checks.

At a glance

Text on #FFFF00Contrast ratio, roundedWCAG AA text contrast
Black #00000019.56:1Passes normal and large text
Dark gray #33333311.77:1Passes normal and large text
White #FFFFFF1.07:1Fails normal and large text

Related questions

Does white text pass if I make it bold?

Not at 1.07:1. Even qualifying large text needs at least 3:1 for WCAG AA contrast.

Do these numbers apply to pastel yellow?

No. Recalculate for the exact foreground and background colors. The table uses opaque #FFFF00 only.

Does passing this contrast check mean the whole page is accessible?

No. Text contrast is one requirement. Keyboard use, labels, focus visibility and other accessibility needs still matter.

More questions: yellow screen

Open the full yellow screen →

Updated November 16, 2026.