OKLCH to HEX: #FEF08A
Also known as: Tailwind v3 yellow-200
Result
oklch(0.94510 0.12430 101.540) → #FEF08A
Values are shown at full precision, so converting back gives exactly #fef08a. 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
oklch(0.94510 0.12430 101.540)
2. OKLCH → Oklab
a = C·cos H = -0.02487 b = C·sin H = 0.12179
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.961527 m′ = L − 0.1056·a − 0.0639·b = 0.939948 s′ = L − 0.0895·a − 1.2915·b = 0.790039
4. cube
l = 0.961527³ = 0.888964 m = 0.939948³ = 0.830447 s = 0.790039³ = 0.493111
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.991090 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.871362 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.254162
6. linear → sRGB, × 255
R = 0.99607 × 255 = 254.00 → 254 G = 0.94117 × 255 = 240.00 → 240 B = 0.54119 × 255 = 138.00 → 138
7. RGB → HEX
#FEF08A
All formats
- HEX
- #fef08a
- RGB
- rgb(254 240 138)
- RGB (legacy)
- rgb(254, 240, 138)
- HSL
- hsl(52.76 98.31% 76.86%) → hsl(53 98% 77%)
- HWB
- hwb(53 54% 0%)
- OKLCH
- oklch(0.945 0.124 101.5) · oklch(94.5% 0.124 101.5)
- OKLab
- oklab(0.945 -0.025 0.122)
- Lab (D50)
- lab(94.34 -4.96 50.75)
- LCH (D50)
- lch(94.34 51.00 95.58)
- Display P3
- color(display-p3 0.9866 0.9431 0.5939)
- Linear sRGB
- color(srgb-linear 0.9911 0.8714 0.2542)
Gamut: sRGB and Display P3
#FEF08A is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.131 and Display P3 reaches 0.152; this color uses 95% of the sRGB chroma available.
CSS snippets
.element {
color: #fef08a;
color: rgb(254 240 138);
color: hsl(53 98% 77%);
color: oklch(0.945 0.124 101.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.945 0.124 101.5);
}
/* arbitrary values */
class="text-[#fef08a] bg-[oklch(0.945_0.124_101.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9866 0.9431 0.5939); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fef08a calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-200#FFF085
- amber-200#FEE685
- v3 amber-200#FDE68A
- khaki#F0E68C
- v3 lime-200#D9F99D
- lime-200#D8F999
- palegoldenrod#EEE8AA
- v3 yellow-300#FDE047
Lighter and darker, same hue and chroma
- #FFFF9C · oklch(1.000 0.124 101.5) · ΔL +0.06
- #EADC76 · oklch(0.885 0.124 101.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?