HEX to OKLCH: #FCD34D
Also known as: Tailwind v3 amber-300
Result
#FCD34D → oklch(0.879 0.153 91.6)
Values are shown at full precision, so converting back gives exactly #fcd34d. 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: 252/255 = 0.98824 → 0.973445 (((x + 0.055) / 1.055)^2.4) G: 211/255 = 0.82745 → 0.651406 (((x + 0.055) / 1.055)^2.4) B: 77/255 = 0.30196 → 0.074214 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.754463 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.657658 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.316224
3. cube root
l′ = ∛0.754463 = 0.910359 m′ = ∛0.657658 = 0.869628 s′ = ∛0.316224 = 0.681289
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.87897 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00430 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.15336
5. Oklab → OKLCH
C = √(a² + b²) = 0.15342 H = atan2(b, a) = 91.605° L = 0.87897
6. OKLCH
oklch(0.87897 0.15342 91.605) rounded: oklch(0.879 0.153 91.6)
All formats
- HEX
- #fcd34d
- RGB
- rgb(252 211 77)
- RGB (legacy)
- rgb(252, 211, 77)
- HSL
- hsl(45.94 96.69% 64.51%) → hsl(46 97% 65%)
- HWB
- hwb(46 30% 1%)
- OKLCH
- oklch(0.879 0.153 91.6) · oklch(87.9% 0.153 91.6)
- OKLab
- oklab(0.879 -0.004 0.153)
- Lab (D50)
- lab(86.41 4.93 68.60)
- LCH (D50)
- lch(86.41 68.78 85.89)
- Display P3
- color(display-p3 0.9623 0.8335 0.3978)
- Linear sRGB
- color(srgb-linear 0.9734 0.6514 0.0742)
Gamut: sRGB and Display P3
#FCD34D 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.202; this color uses 92% of the sRGB chroma available.
CSS snippets
.element {
color: #fcd34d;
color: rgb(252 211 77);
color: hsl(46 97% 65%);
color: oklch(0.879 0.153 91.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.879 0.153 91.6);
}
/* arbitrary values */
class="text-[#fcd34d] bg-[oklch(0.879_0.153_91.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9623 0.8335 0.3978); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fcd34d calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- amber-300#FFD230
- v3 yellow-400#FACC15
- gold#FFD700
- yellow-400#FDC700
- v3 yellow-300#FDE047
- yellow-300#FFDF20
- v3 amber-400#FBBF24
- amber-200#FEE685
Lighter and darker, same hue and chroma
- #FFE764 · oklch(0.939 0.153 91.6) · ΔL +0.06
- #E8BF33 · oklch(0.819 0.153 91.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?