OKLCH to HEX: #FEF9C3

Also known as: Tailwind v3 yellow-100

Result

oklch(0.97292 0.06935 103.193) → #FEF9C3

Values are shown at full precision, so converting back gives exactly #fef9c3. 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. 1. input

    oklch(0.97292 0.06935 103.193)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.01583
    b = C·sin H = 0.06752
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.981218
    m′ = L − 0.1056·a − 0.0639·b = 0.970279
    s′ = L − 0.0895·a − 1.2915·b = 0.887136
  4. 4. cube

    l = 0.981218³ = 0.944705
    m = 0.970279³ = 0.913462
    s = 0.887136³ = 0.698184
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.991110
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.947310
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.545720
  6. 6. linear → sRGB, × 255

    R = 0.99608 × 255 = 254.00 → 254
    G = 0.97647 × 255 = 249.00 → 249
    B = 0.76470 × 255 = 195.00 → 195
  7. 7. RGB → HEX

    #FEF9C3

All formats

HEX
#fef9c3
RGB
rgb(254 249 195)
RGB (legacy)
rgb(254, 249, 195)
HSL
hsl(54.92 96.72% 88.04%) → hsl(55 97% 88%)
HWB
hwb(55 76% 0%)
OKLCH
oklch(0.973 0.069 103.2) · oklch(97.3% 0.069 103.2)
OKLab
oklab(0.973 -0.016 0.068)
Lab (D50)
lab(97.34 -4.44 26.68)
LCH (D50)
lch(97.34 27.04 99.44)
Display P3
color(display-p3 0.9926 0.9771 0.7872)
Linear sRGB
color(srgb-linear 0.9911 0.9473 0.5457)

Gamut: sRGB and Display P3

#FEF9C3 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.077 and Display P3 reaches 0.087; this color uses 90% of the sRGB chroma available.

CSS snippets

.element {
  color: #fef9c3;
  color: rgb(254 249 195);
  color: hsl(55 97% 88%);
  color: oklch(0.973 0.069 103.2);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.973 0.069 103.2);
}
/* arbitrary values */
class="text-[#fef9c3] bg-[oklch(0.973_0.069_103.2)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9926 0.9771 0.7872); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fef9c3 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #FFFFCC · oklch(1.000 0.069 103.2) · ΔL +0.06
  • #EAE5B0 · oklch(0.913 0.069 103.2) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?