HEX to OKLCH: #FFFBEB
Also known as: Tailwind amber-50, Tailwind v3 amber-50
Result
#FFFBEB → oklch(0.987 0.021 95.3)
Values are shown at full precision, so converting back gives exactly #fffbeb. 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: 255/255 = 1.00000 → 1.000000 (((x + 0.055) / 1.055)^2.4) G: 251/255 = 0.98431 → 0.964686 (((x + 0.055) / 1.055)^2.4) B: 235/255 = 0.92157 → 0.830770 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.972354 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.957787 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.883440
3. cube root
l′ = ∛0.972354 = 0.990698 m′ = ∛0.957787 = 0.985726 s′ = ∛0.883440 = 0.959531
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.98688 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00197 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.02131
5. Oklab → OKLCH
C = √(a² + b²) = 0.02140 H = atan2(b, a) = 95.277° L = 0.98688
6. OKLCH
oklch(0.98688 0.02140 95.277) rounded: oklch(0.987 0.021 95.3)
All formats
- HEX
- #fffbeb
- RGB
- rgb(255 251 235)
- RGB (legacy)
- rgb(255, 251, 235)
- HSL
- hsl(48.00 100.00% 96.08%) → hsl(48 100% 96%)
- HWB
- hwb(48 92% 0%)
- OKLCH
- oklch(0.987 0.021 95.3) · oklch(98.7% 0.021 95.3)
- OKLab
- oklab(0.987 -0.002 0.021)
- Lab (D50)
- lab(98.61 -0.62 8.19)
- LCH (D50)
- lch(98.61 8.22 94.34)
- Display P3
- color(display-p3 0.9972 0.9848 0.9277)
- Linear sRGB
- color(srgb-linear 1.0000 0.9647 0.8308)
Gamut: sRGB and Display P3
#FFFBEB is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.021 and Display P3 reaches 0.025; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #fffbeb;
color: rgb(255 251 235);
color: hsl(48 100% 96%);
color: oklch(0.987 0.021 95.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.987 0.021 95.3);
}
/* arbitrary values */
class="text-[#fffbeb] bg-[oklch(0.987_0.021_95.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9972 0.9848 0.9277); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fffbeb calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-50#FEFCE8
- floralwhite#FFFAF0
- ivory#FFFFF0
- orange-50#FFF7ED
- lime-50#F7FEE7
- oldlace#FDF5E6
- seashell#FFF5EE
- cornsilk#FFF8DC
Lighter and darker, same hue and chroma
- #FFFFEF · oklch(1.000 0.021 95.3) · ΔL +0.06
- #EBE7D7 · oklch(0.927 0.021 95.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?