HSL to HEX: #CA8A04
Also known as: Tailwind v3 yellow-600
Result
hsl(40.61 96.12% 40.39%) → #CA8A04
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. input
H = 40.61°, S = 96.12%, L = 40.39%
2. C
C = (1 − |2L − 1|) × S = 0.77646
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.52553 (H / 60° = 0.6768, sector 0)
4. m
m = L − C / 2 = 0.01567
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.77646, 0.52553, 0.00000) R = round((0.77646 + 0.01567) × 255) = 202 G = round((0.52553 + 0.01567) × 255) = 138 B = round((0.00000 + 0.01567) × 255) = 4
6. RGB → HEX
#CA8A04
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?