Yellow Color (#FFFF00)

#FFFF00rgb(255, 255, 0)

The yellow hex code is #FFFF00 (short form #FF0), with RGB values of 255, 255, 0. Yellow is the pure yellow of the sRGB screen: full red and full green with no blue. It is extremely bright, with a relative luminance above 0.9.

Color Overview & Formats

CSS: yellowLuminance: 0.9278
HEX
#FFFF00
RGB
rgb(255, 255, 0)
HSL
hsl(60, 100%, 50%)
Yellow (#FFFF00) Color Format Conversions
FormatSyntax / ValuesNotesAction
HEX#FFFF006-digit hex web code
RGBrgb(255, 255, 0)Red, Green, Blue channels (0-255)
HSLhsl(60, 100%, 50%)Hue (60°), Saturation (100%), Lightness (50%)
HSV / HSBhsv(60, 100%, 100%)Hue, Saturation (100%), Value/Brightness (100%)
CMYKcmyk(0%, 0%, 100%, 0%)Digital mathematical approximation (non-print)
OKLCHoklch(0.968 0.211 109.8)Perceptually uniform color space (CSS Color 4 approximation)
CSS Implementation & Quick Steps
background-color: #FFFF00; /* or yellow */
  1. Select color format: Choose the desired format (HEX #FFFF00, RGB, or HSL).
  2. Copy the code: Click the copy button or press Tab+Enter to store in clipboard.
  3. Pair with black text: Black text on Yellow reaches 19.56:1 (WCAG AAA).

What Colors Go With Yellow?

These 6 colors all go well with Yellow (#FFFF00), and each one is a standard CSS named color. The ratio is the WCAG 2.2 contrast of that color on Yellow: at 4.5:1 or above it works for text; below that, use it for backgrounds and accents.

Black

#000000
19.56:1Text-safe

The classic partner: the strongest contrast, used in signs and warnings.

Navy

#000080
14.91:1Text-safe

A deep blue that gives readable text and a crisp complementary contrast.

Indigo

#4B0082
12.06:1Text-safe

A dark violet from the opposite side of the color wheel.

Purple

#800080
8.77:1Text-safe

A rich complement for bold, playful designs.

Blue

#0000FF
8:1Text-safe

A primary-color contrast that reads as energetic and graphic.

Dim Gray

#696969
5.11:1Text-safe

A neutral gray for readable secondary text.

Harmonious Palettes & Tints

Yellow and navy notice palette

Keep bright #FFFF00 on the surrounding panel or a small highlight. A white reading surface reduces the amount of saturated yellow behind a longer message; navy provides readable text on both.

A note worth noticing

Use yellow to draw attention and a white card to hold the details.

Read the details

Text on canvas: 14.91:1. Text on card: 16.01:1. Button label: 16.01:1. All three exceed the WCAG AA requirement of 4.5:1 for body text.

View CSS and usage

Use color-theme on the wrapper, example-card on its card and example-action on a button or link.

.color-theme {
  --canvas: #FFFF00;
  --surface: #FFFFFF;
  --ink: #000080;
  --action: #000080;
  --action-text: #FFFFFF;
  background: var(--canvas);
  color: var(--ink);
  padding: 24px;
}
.color-theme .example-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 24px;
}
.color-theme .example-action {
  background: var(--action);
  color: var(--action-text);
  border-radius: 6px;
  padding: 10px 16px;
}

The palettes below are algorithmically generated across standard intervals based on Yellow (HSL 60°). Each group offers full palette copy and live preview:

Complementary Harmony

Hue rotated 180 degrees on the HSL wheel (60° to 240°), keeping the original saturation and lightness.

Yellow
#FFFF00
Complement (240°)
#0000FF
Live UI Component Mockup
Component Header SampleBlack text on Yellow: 19.56:1 (WCAG AAA).
Button style preview

Analogous Harmony

Hues 30 degrees either side (30° and 90°), keeping the original saturation and lightness.

Analogous (30°)
#FF8000
Yellow
#FFFF00
Analogous (90°)
#80FF00
Live UI Component Mockup
Component Header SampleBlack text on Yellow: 19.56:1 (WCAG AAA).
Button style preview

Triadic Harmony

Hues spaced evenly by 120 degrees (180° and 300°), keeping the original saturation and lightness.

Yellow
#FFFF00
Triadic (180°)
#00FFFF
Triadic (300°)
#FF00FF
Live UI Component Mockup
Component Header SampleBlack text on Yellow: 19.56:1 (WCAG AAA).
Button style preview

Tints & Shades

Mixed with white (tints) and black (shades) in sRGB at 60% and 30%.

Tint 60%
#FFFF99
Tint 30%
#FFFF4D
Yellow
#FFFF00
Shade 30%
#B3B300
Shade 60%
#666600
Live UI Component Mockup
Component Header SampleBlack text on Yellow: 19.56:1 (WCAG AAA).
Button style preview

WCAG 2.2 Text Readability & Contrast Check

Under WCAG 2.2 criteria, regular body text requires at least 4.5:1 (AA) and large text requires at least 3.0:1. The table below displays calculated contrast ratios:

Text Contrast Ratios on Yellow (#FFFF00)
Foreground ColorContrast RatioNormal Text (AA)Large Text (AA)Normal Text AAA (>= 7.0:1)
Pure Black (#000000)
19.56:1PassPassPass
Pure White (#FFFFFF)
1.07:1FailFailFail
Dark Charcoal (#212529)
14.37:1PassPassPass
Mid Gray (#666666)
5.35:1PassPassFail

Interactive Contrast Tester

Enter text foreground and background colors to verify WCAG legibility:

Calculated Ratio:
19.56:1
Normal: Pass AAALarge: Pass AAA
Large Heading Sample (18pt Bold)

This is sample body text rendered directly to verify contrast and readability.

Yellow Background Download

Download standard 1920x1080 solid desktop wallpaper or generate mobile wallpaper:

Yellow 1920x1080 solid color background wallpaper previewStandard Wallpaper: 1920x1080 PNG (#FFFF00)

Download Options

All wallpaper files precisely match the W3C standard color value:

Download 1920x1080 PNG

CSS Standard & Usage Notes

yellow = #ffff00 (rgb(255, 255, 0))
W3C CSS Color 4

UI Design & Accessibility Guidelines

Use it for highlights, warning signs and small accents, and keep white text away from it. On Yellow, black text passes WCAG AAA at every size (19.56:1); white text fails even for large text (1.07:1).

Published: · Modified: · Editorial: SwatchAtlas Editorial Team

Frequently Asked Questions (FAQ)

Can I use black text on Yellow?

Yes. Black text on Yellow has a WCAG 2.2 contrast ratio of 19.56:1, passing both AA (4.5:1) and AAA (7:1) at every text size.

Can I use white text on Yellow?

No. White text on Yellow has a WCAG 2.2 contrast ratio of only 1.07:1, below the 3:1 minimum even for large text.

What colors go with Yellow?

Black, Navy, Indigo, Purple, Blue and Dim Gray all go well with Yellow. Black (19.56:1), Navy (14.91:1), Indigo (12.06:1), Purple (8.77:1), Blue (8:1) and Dim Gray (5.11:1) have enough contrast for text on Yellow.

What is the hex code for yellow?

The CSS named color yellow is #FFFF00, which is RGB(255, 255, 0). The short form #FF0 is the same color.