Skip to content

Yellow

Hex #FFFF00, rgb(255 255 0). A yellow CSS named color.

Open in palette generator

Yellow color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Yellow

Yellow is a very light vivid yellow with the hex code #FFFF00. In RGB it is made of 255 red, 255 green and 0 blue; in HSL its hue is 60°, with 100% saturation and 50% lightness. Its perceptual lightness (OKLCH L) is 96.8%.

It is a CSS named color, so you can write "yellow" anywhere CSS accepts a color. Against white it has a contrast ratio of 1.07:1 and against black 19.56:1, so black text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Yellow mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Yellow 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Yellow

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Monochromatic

Contrast and readability

WCAG 2 contrast of Yellow with white and black. The readable text color on Yellow is black.

Yellow textSmall text on white

On white1.07:1

  • AA fail
  • AA Large fail
  • AAA fail
  • UI 3:1 fail

APCA Lc 0

Yellow textSmall text on black

On black19.56:1

  • AA pass
  • AA Large pass
  • AAA pass
  • UI 3:1 pass

APCA Lc -103

Black text on Yellow (#000000)

Test any pair in the contrast checker.

Color blindness preview

How Yellow appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#FFF400
  • Deuteranopia#FFFA31
  • Tritanopia#FFEED9
  • Protanomaly#FFF700
  • Deuteranomaly#FFFA27
  • Tritanomaly#FFF899
  • Achromatopsia#F7F7F7

Colors similar to Yellow

The closest named colors by perceptual difference (OKLab).

Use Yellow in CSS and Tailwind

CSS
.yellow {
  color: yellow; /* #FFFF00 */
  background-color: rgb(255 255 0);
  border-color: oklch(96.8% 0.211 109.8);
}
Tailwind CSS
/* Tailwind CSS v4: bg-yellow-500, text-yellow-700... */
@theme {
  --color-yellow-50: #FFFF00;
  --color-yellow-100: #F2F200;
  --color-yellow-200: #DFDF00;
  --color-yellow-300: #C3C300;
  --color-yellow-400: #9F9F00;
  --color-yellow-500: #888800;
  --color-yellow-600: #757500;
  --color-yellow-700: #5E5E00;
  --color-yellow-800: #4B4B00;
  --color-yellow-900: #3D3D00;
  --color-yellow-950: #171700;
}

<!-- or the exact color, no config -->
<div class="bg-[#FFFF00] text-[#000000]">…</div>