HEX to OKLCH: #FA8072

Also known as: CSS salmon

Result

#FA8072 → oklch(0.735 0.152 28.1)

Values are shown at full precision, so converting back gives exactly #fa8072. 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. sRGB → linear

    R: 250/255 = 0.98039 → 0.955973  (((x + 0.055) / 1.055)^2.4)
    G: 128/255 = 0.50196 → 0.215861  (((x + 0.055) / 1.055)^2.4)
    B: 114/255 = 0.44706 → 0.168269  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.518503
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.367582
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.251233
  3. 3. cube root

    l′ = ∛0.518503 = 0.803373
    m′ = ∛0.367582 = 0.716338
    s′ = ∛0.251233 = 0.630994
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.73500
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.13370
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.07127
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.15151
    H = atan2(b, a) = 28.060°
    L = 0.73500
  6. 6. OKLCH

    oklch(0.73500 0.15151 28.060)
    rounded: oklch(0.735 0.152 28.1)

All formats

HEX
#fa8072
RGB
rgb(250 128 114)
RGB (legacy)
rgb(250, 128, 114)
HSL
hsl(6.18 93.15% 71.37%) → hsl(6 93% 71%)
HWB
hwb(6 45% 2%)
OKLCH
oklch(0.735 0.152 28.1) · oklch(73.5% 0.152 28.1)
OKLab
oklab(0.735 0.134 0.071)
Lab (D50)
lab(67.85 46.63 30.16)
LCH (D50)
lch(67.85 55.53 32.90)
Display P3
color(display-p3 0.9185 0.5275 0.4675)
Linear sRGB
color(srgb-linear 0.9560 0.2159 0.1683)

Gamut: sRGB and Display P3

#FA8072 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.162 and Display P3 reaches 0.207; this color uses 93% of the sRGB chroma available.

CSS snippets

.element {
  color: #fa8072;
  color: rgb(250 128 114);
  color: hsl(6 93% 71%);
  color: oklch(0.735 0.152 28.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.735 0.152 28.1);
}
/* arbitrary values */
class="text-[#fa8072] bg-[oklch(0.735_0.152_28.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.9185 0.5275 0.4675); }
}

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

  • #FF9384 · oklch(0.795 0.152 28.1) · ΔL +0.06
  • #E56D60 · oklch(0.675 0.152 28.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?