Yellow color #FFFF00
rgb(255, 255, 0) · oklch(96.8% 0.211 109.8)
Yellow (#FFFF00) is a very light, vivid, warm yellow. It mixes 100% red, 100% green and 0% blue, with a perceived lightness of 96.8% in OKLCH. Black text reads best on it (19.55:1 vs 1.07:1). The closest other CSS color is Green Yellow (#ADFF2F). For people with tritanopia it shifts the most, toward #FFEED9.
Yellow color codes
| HEX | |
|---|---|
| RGB | |
| HSL | |
| HSV / HSB | |
| OKLCH | |
| CMYK | |
| CSS keyword |
Click a value to copy it. Convert any other color with the color converter.
Shades, tints and tones of yellow
Shades mix yellow with black, tints mix it with white, and tones mix it with gray. Mixing happens in OKLab, so the steps look evenly spaced.
Tints (lighter)
Shades (darker)
Tones (muted)
Yellow as a UI color scale (50–950)
An 11-step scale for design systems, with yellow placed at step 50. Copy it as a Tailwind v4 theme below.
Colors that go with yellow
Harmonies are computed on the OKLCH hue wheel, keeping yellow’s lightness and saturation where the sRGB gamut allows. Open any row in the palette generator to adjust it.
Complementary
EditThe base color and the hue directly opposite it. Maximum contrast; use one as the accent.
Split complementary
EditThe base plus the two hues beside its complement (±30°). Contrast with less tension than complementary.
Tetradic (rectangle)
EditTwo complementary pairs (rectangle: 0°, 60°, 180°, 240°). Rich; needs one dominant color.
Is yellow accessible? Contrast with white and black
1.07:1
AA fail AA large fail AAA fail
19.55:1
AA pass AA large pass AAA pass
- As a background, yellow works best with black text.
- For body text on white, use the darker variant (the closest color that passes AA, 4.5:1).
How yellow looks with color blindness
Simulated with the Machado et al. (2009) model. Around 1 in 12 men and 1 in 200 women have some form of color vision deficiency.
#fff400 Red-blind. Reds look dark and brownish; red and green are easily confused.
#fffa31 Green-blind, the most common strong form. Red, green, orange and brown look similar.
#ffeed9 Blue-blind and rare. Blue and green are confused, as are yellow and pink.
#f7f7f7 Total color blindness, very rare. Only lightness differences are visible.
Colors similar to yellow
The closest CSS named colors by perceptual distance (ΔE OK; under 2 is hard to tell apart).
Use yellow in CSS and Tailwind
CSS custom properties
:root {
--yellow: #ffff00;
--yellow-rgb: 255 255 0;
}
.text-yellow { color: var(--yellow); }
.bg-yellow { background-color: var(--yellow); }
Tailwind v4 theme
@theme {
--color-yellow-50: #ffff00;
--color-yellow-100: #eef0c9;
--color-yellow-200: #dee09d;
--color-yellow-300: #c6c864;
--color-yellow-400: #a8a82d;
--color-yellow-500: #8c8c00;
--color-yellow-600: #747400;
--color-yellow-700: #5c5c11;
--color-yellow-800: #474818;
--color-yellow-900: #373818;
--color-yellow-950: #202010;
}
Make a gradient from yellow: open the gradient generator.
Painting in Procreate or designing in Photoshop? See our palette packs: every color with HEX codes is free to browse, and the swatch files are a quick download.