OKLCH to HEX: #F0E68C

Also known as: CSS khaki

Result

oklch(0.91349 0.11192 102.829) → #F0E68C

Values are shown at full precision, so converting back gives exactly #f0e68c. 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.91349 0.11192 102.829)
  2. 2. OKLCH → Oklab

    a = C·cos H = -0.02485
    b = C·sin H = 0.10913
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.927190
    m′ = L − 0.1056·a − 0.0639·b = 0.909145
    s′ = L − 0.0895·a − 1.2915·b = 0.774779
  4. 4. cube

    l = 0.927190³ = 0.797089
    m = 0.909145³ = 0.751449
    s = 0.774779³ = 0.465086
  5. 5. LMS → linear sRGB

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

    R = 0.94118 × 255 = 240.00 → 240
    G = 0.90196 × 255 = 230.00 → 230
    B = 0.54903 × 255 = 140.00 → 140
  7. 7. RGB → HEX

    #F0E68C

All formats

HEX
#f0e68c
RGB
rgb(240 230 140)
RGB (legacy)
rgb(240, 230, 140)
HSL
hsl(54.00 76.92% 74.51%) → hsl(54 77% 75%)
HWB
hwb(54 55% 6%)
OKLCH
oklch(0.913 0.112 102.8) · oklch(91.3% 0.112 102.8)
OKLab
oklab(0.913 -0.025 0.109)
Lab (D50)
lab(90.64 -5.60 45.00)
LCH (D50)
lch(90.64 45.34 97.09)
Display P3
color(display-p3 0.9344 0.9033 0.5935)
Linear sRGB
color(srgb-linear 0.8714 0.7913 0.2623)

Gamut: sRGB and Display P3

#F0E68C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.192 and Display P3 reaches 0.222; this color uses 58% of the sRGB chroma available.

CSS snippets

.element {
  color: #f0e68c;
  color: rgb(240 230 140);
  color: hsl(54 77% 75%);
  color: oklch(0.913 0.112 102.8);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.913 0.112 102.8);
}
/* arbitrary values */
class="text-[#f0e68c] bg-[oklch(0.913_0.112_102.8)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9344 0.9033 0.5935); }
}

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

  • #FFFA9F · oklch(0.973 0.112 102.8) · ΔL +0.06
  • #DCD279 · oklch(0.853 0.112 102.8) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?