OKLCH to HEX: #FFD700

Also known as: CSS gold

Result

oklch(0.88677 0.18219 95.330) → #FFD700

Values are shown at full precision, so converting back gives exactly #ffd700. 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.88677 0.18219 95.330)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.01692
    b = C·sin H = 0.18140
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.919210
    m′ = L − 0.1056·a − 0.0639·b = 0.876973
    s′ = L − 0.0895·a − 1.2915·b = 0.654006
  4. 4. cube

    l = 0.919210³ = 0.776683
    m = 0.876973³ = 0.674464
    s = 0.654006³ = 0.279734
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 1.000012
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.679536
    B = −0.0042·l − 0.7034·m + 1.7076·s = -0.000012
  6. 6. linear → sRGB, × 255

    R = 1.00000 × 255 = 255.00 → 255
    G = 0.84313 × 255 = 215.00 → 215
    B = 0.00000 × 255 = 0.00 → 0
  7. 7. RGB → HEX

    #FFD700

All formats

HEX
#ffd700
RGB
rgb(255 215 0)
RGB (legacy)
rgb(255, 215, 0)
HSL
hsl(50.59 100.00% 50.00%) → hsl(51 100% 50%)
HWB
hwb(51 0% 0%)
OKLCH
oklch(0.887 0.182 95.3) · oklch(88.7% 0.182 95.3)
OKLab
oklab(0.887 -0.017 0.181)
Lab (D50)
lab(87.47 2.91 86.55)
LCH (D50)
lch(87.47 86.60 88.07)
Display P3
color(display-p3 0.9746 0.8490 0.2855)
Linear sRGB
color(srgb-linear 1.0000 0.6795 0.0000)

Gamut: sRGB and Display P3

#FFD700 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.182 and Display P3 reaches 0.211; this color uses 100% of the sRGB chroma available.

CSS snippets

.element {
  color: #ffd700;
  color: rgb(255 215 0);
  color: hsl(51 100% 50%);
  color: oklch(0.887 0.182 95.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.887 0.182 95.3);
}
/* arbitrary values */
class="text-[#ffd700] bg-[oklch(0.887_0.182_95.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9746 0.8490 0.2855); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #ffd700 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

  • #FFEB38 · oklch(0.947 0.182 95.3) · ΔL +0.06
  • #EBC300 · oklch(0.827 0.182 95.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?