HEX to RGB: #CA8A04
Also known as: Tailwind v3 yellow-600
Result
#CA8A04 → rgb(202 138 4)
Values are shown at full precision, so converting back gives exactly #ca8a04. 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
#CA8A04 → CA | 8A | 04
2. base 16 → base 10
R = CA₁₆ = 12×16 + 10 = 202 G = 8A₁₆ = 8×16 + 10 = 138 B = 04₁₆ = 0×16 + 4 = 4
3. RGB
rgb(202 138 4)
All formats
- HEX
- #ca8a04
- RGB
- rgb(202 138 4)
- RGB (legacy)
- rgb(202, 138, 4)
- HSL
- hsl(40.61 96.12% 40.39%) → hsl(41 96% 40%)
- HWB
- hwb(41 2% 21%)
- OKLCH
- oklch(0.681 0.142 75.8) · oklch(68.1% 0.142 75.8)
- OKLab
- oklab(0.681 0.035 0.138)
- Lab (D50)
- lab(62.82 18.83 66.97)
- LCH (D50)
- lch(62.82 69.57 74.30)
- Display P3
- color(display-p3 0.7553 0.5520 0.1884)
- Linear sRGB
- color(srgb-linear 0.5906 0.2542 0.0012)
Gamut: sRGB and Display P3
#CA8A04 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.143 and Display P3 reaches 0.164; this color uses 99% of the sRGB chroma available.
CSS snippets
.element {
color: #ca8a04;
color: rgb(202 138 4);
color: hsl(41 96% 40%);
color: oklch(0.681 0.142 75.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.681 0.142 75.8);
}
/* arbitrary values */
class="text-[#ca8a04] bg-[oklch(0.681_0.142_75.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.7553 0.5520 0.1884); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ca8a04 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-600#D08700
- darkgoldenrod#B8860B
- peru#CD853F
- v3 amber-600#D97706
- amber-600#E17100
- goldenrod#DAA520
- chocolate#D2691E
- v3 amber-500#F59E0B
Lighter and darker, same hue and chroma
- #DE9D2C · oklch(0.741 0.142 75.8) · ΔL +0.06
- #B67800 · oklch(0.621 0.142 75.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?