Gold Hex Code #FFD700
Gold is a very light, vivid yellow with the hex code #FFD700. In RGB it is 255, 215, 0, and in HSL it is 51°, 100%, 50%. It is one of the 148 named colors in CSS, so you can write “gold” instead of the hex code.
- HEX
- #FFD700
- RGB
- rgb(255, 215, 0)
- HSL
- hsl(51, 100%, 50%)
- HSV
- hsv(51°, 100%, 100%)
- CMYK
- cmyk(0%, 16%, 100%, 0%)
- CSS name
- gold
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Gold
On a white background Gold has a contrast ratio of 1.40:1 (Fail), and on black 14.97:1 (AAA). Black text is the better choice on top of it.
It sits on the warm side of the color wheel, a range that tends to feel energetic and appears to advance toward the viewer.
Yellow is the brightest hue, so it is excellent for highlights but difficult to read as text on a white background. Pair it with dark text rather than white.
Good to know: CSS gold (#ffd700) is a bright yellow, not a metallic color. A flat color cannot show the shine of real gold, so designers usually build gold effects from gradients that move between lighter and darker yellows.
Shades and tints of Gold
Tints mix Gold with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Gold
These schemes are calculated from Gold on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Gold is #5200FF, close to the named color Blue.
Gold contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Gold scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 1.40:1 | ✕ Fail | ✕ Fail | ✕ Fail | ✕ Fail |
| Black (#000000) | 14.97:1 | ✓ Pass | ✓ Pass | ✓ Pass | ✓ Pass |
Gold and color blindness
These are approximate previews of how Gold can look with the main types of color vision deficiency.
Gold looks almost the same.
Gold shifts slightly.
Gold changes noticeably.
Gold changes noticeably.
Gradients with Gold
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Gold to a lighter tint
background: linear-gradient(135deg, #ffd700 0%, #ffef99 100%); Gold to its analogous neighbour
background: linear-gradient(135deg, #ffd700 0%, #a8ff00 100%); Gold to its complement
background: linear-gradient(135deg, #ffd700 0%, #0028ff 100%); Colors similar to Gold
How each close match differs from Gold.
- Yellow #FFFF00 Slightly lighter.
- Goldenrod #DAA520 Darker, more muted, leans more orange.
- Orange #FFA500 Slightly darker, leans more orange.
- Dark Goldenrod #B8860B Darker, more muted, leans more orange.
- Yellow Green #9ACD32 Slightly darker, more muted, leans more green.
- Khaki #F0E68C Slightly lighter, more muted.
Use Gold in code
.element {
color: #ffd700;
background-color: #ffd700;
border-color: gold; /* gold is a valid CSS color name */
} :root {
--color-gold: #ffd700;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#ffd700] text-[#ffd700] border-[#ffd700]"></div>
/* Tailwind v4 theme color */
@theme {
--color-gold: #ffd700;
} Gold questions
What is the hex code for Gold?
The hex code for Gold is #FFD700. In RGB that is rgb(255, 215, 0), and in HSL it is hsl(51, 100%, 50%).
What is the complementary color of Gold?
On the RGB (screen) color wheel, the complement of Gold is #0028FF, which is close to Blue. On the artist’s RYB wheel it is #5200FF, close to Blue.
Should I use white or black text on Gold?
Black text. It has a contrast ratio of 14.97:1 against Gold, which is WCAG AAA. The other option scores 1.40:1.
Is Gold accessible as a text color on white?
No. Gold on white scores 1.40:1, which is below the WCAG minimum of 3:1 even for large text.
What are darker and lighter shades of Gold?
Mixing Gold with black gives #CCAC00, #998100, #665600, #332B00 (20% to 80% black). Mixing it with white gives #FFDF33, #FFE766, #FFEF99, #FFF7CC (20% to 80% white).