HEX to RGB: #FFD700
Also known as: CSS gold
Result
#FFD700 → rgb(255 215 0)
Values are shown at full precision, so converting back gives exactly #ffd700. The rounded form is what you normally paste into CSS.
Step-by-step math
Every number below is computed from the input, nothing is looked up.
1. HEX → pairs
#FFD700 → FF | D7 | 00
2. base 16 → base 10
R = FF₁₆ = 15×16 + 15 = 255 G = D7₁₆ = 13×16 + 7 = 215 B = 00₁₆ = 0×16 + 0 = 0
3. RGB
rgb(255 215 0)
All formats
- HEX
- #ffd700
- RGB
- rgb(255 215 0)
- RGB (legacy)
- rgb(255, 215, 0)
- HSL
- hsl(50.59 100.00% 50.00%) → hsl(51 100% 50%)
- HWB
- hwb(51 0% 0%)
- OKLCH
- oklch(0.887 0.182 95.3) · oklch(88.7% 0.182 95.3)
- OKLab
- oklab(0.887 -0.017 0.181)
- Lab (D50)
- lab(87.47 2.91 86.55)
- LCH (D50)
- lch(87.47 86.60 88.07)
- Display P3
- color(display-p3 0.9746 0.8490 0.2855)
- Linear sRGB
- color(srgb-linear 1.0000 0.6795 0.0000)
Gamut: sRGB and Display P3
#FFD700 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.182 and Display P3 reaches 0.211; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #ffd700;
color: rgb(255 215 0);
color: hsl(51 100% 50%);
color: oklch(0.887 0.182 95.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.887 0.182 95.3);
}
/* arbitrary values */
class="text-[#ffd700] bg-[oklch(0.887_0.182_95.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9746 0.8490 0.2855); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ffd700 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-300#FFDF20
- amber-300#FFD230
- v3 yellow-300#FDE047
- v3 yellow-400#FACC15
- v3 amber-300#FCD34D
- yellow-400#FDC700
- v3 amber-400#FBBF24
- amber-200#FEE685
Lighter and darker, same hue and chroma
- #FFEB38 · oklch(0.947 0.182 95.3) · ΔL +0.06
- #EBC300 · oklch(0.827 0.182 95.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?