Yellow Color (#FFFF00)
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
yellowLuminance: 0.9278| Format | Syntax / Values | Notes | Action |
|---|---|---|---|
| HEX | #FFFF00 | 6-digit hex web code | |
| RGB | rgb(255, 255, 0) | Red, Green, Blue channels (0-255) | |
| HSL | hsl(60, 100%, 50%) | Hue (60°), Saturation (100%), Lightness (50%) | |
| HSV / HSB | hsv(60, 100%, 100%) | Hue, Saturation (100%), Value/Brightness (100%) | |
| CMYK | cmyk(0%, 0%, 100%, 0%) | Digital mathematical approximation (non-print) | |
| OKLCH | oklch(0.968 0.211 109.8) | Perceptually uniform color space (CSS Color 4 approximation) |
background-color: #FFFF00; /* or yellow */- Select color format: Choose the desired format (HEX #FFFF00, RGB, or HSL).
- Copy the code: Click the copy button or press Tab+Enter to store in clipboard.
- 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.
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.
Use yellow to draw attention and a white card to hold the details.
Read the detailsText 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.
Analogous Harmony
Hues 30 degrees either side (30° and 90°), keeping the original saturation and lightness.
Triadic Harmony
Hues spaced evenly by 120 degrees (180° and 300°), keeping the original saturation and lightness.
Tints & Shades
Mixed with white (tints) and black (shades) in sRGB at 60% and 30%.
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:
| Foreground Color | Contrast Ratio | Normal Text (AA) | Large Text (AA) | Normal Text AAA (>= 7.0:1) |
|---|---|---|---|---|
Pure Black (#000000) | 19.56:1 | Pass | Pass | Pass |
Pure White (#FFFFFF) | 1.07:1 | Fail | Fail | Fail |
Dark Charcoal (#212529) | 14.37:1 | Pass | Pass | Pass |
Mid Gray (#666666) | 5.35:1 | Pass | Pass | Fail |
Interactive Contrast Tester
Enter text foreground and background colors to verify WCAG legibility:
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:
Standard Wallpaper: 1920x1080 PNG (#FFFF00)Download Options
All wallpaper files precisely match the W3C standard color value:
CSS Standard & Usage Notes
yellow = #ffff00 (rgb(255, 255, 0))
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).
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.