HEX to OKLCH: #F59E0B
Also known as: Tailwind v3 amber-500
Result
#F59E0B → oklch(0.769 0.165 70.1)
Values are shown at full precision, so converting back gives exactly #f59e0b. 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. sRGB → linear
R: 245/255 = 0.96078 → 0.913099 (((x + 0.055) / 1.055)^2.4) G: 158/255 = 0.61961 → 0.341914 (((x + 0.055) / 1.055)^2.4) B: 11/255 = 0.04314 → 0.003347 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.559951 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.426589 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.179061
3. cube root
l′ = ∛0.559951 = 0.824233 m′ = ∛0.426589 = 0.752783 s′ = ∛0.179061 = 0.563638
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.76859 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.05610 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.15481
5. Oklab → OKLCH
C = √(a² + b²) = 0.16466 H = atan2(b, a) = 70.080° L = 0.76859
6. OKLCH
oklch(0.76859 0.16466 70.080) rounded: oklch(0.769 0.165 70.1)
All formats
- HEX
- #f59e0b
- RGB
- rgb(245 158 11)
- RGB (legacy)
- rgb(245, 158, 11)
- HSL
- hsl(37.69 92.13% 50.20%) → hsl(38 92% 50%)
- HWB
- hwb(38 4% 4%)
- OKLCH
- oklch(0.769 0.165 70.1) · oklch(76.9% 0.165 70.1)
- OKLab
- oklab(0.769 0.056 0.155)
- Lab (D50)
- lab(72.79 26.93 75.43)
- LCH (D50)
- lch(72.79 80.10 70.35)
- Display P3
- color(display-p3 0.9122 0.6349 0.2305)
- Linear sRGB
- color(srgb-linear 0.9131 0.3419 0.0033)
Gamut: sRGB and Display P3
#F59E0B is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.166 and Display P3 reaches 0.191; this color uses 99% of the sRGB chroma available.
CSS snippets
.element {
color: #f59e0b;
color: rgb(245 158 11);
color: hsl(38 92% 50%);
color: oklch(0.769 0.165 70.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.769 0.165 70.1);
}
/* arbitrary values */
class="text-[#f59e0b] bg-[oklch(0.769_0.165_70.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9122 0.6349 0.2305); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #f59e0b calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- amber-500#FE9A00
- orange#FFA500
- v3 orange-400#FB923C
- darkorange#FF8C00
- goldenrod#DAA520
- yellow-500#F0B100
- sandybrown#F4A460
- orange-400#FF8904
Lighter and darker, same hue and chroma
- #FFB133 · oklch(0.829 0.165 70.1) · ΔL +0.06
- #E18B00 · oklch(0.709 0.165 70.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?