HEX to OKLCH: #5F9EA0

Also known as: CSS cadetblue

Result

#5F9EA0 → oklch(0.658 0.065 198.3)

Values are shown at full precision, so converting back gives exactly #5f9ea0. 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: 95/255 = 0.37255 → 0.114435  (((x + 0.055) / 1.055)^2.4)
    G: 158/255 = 0.61961 → 0.341914  (((x + 0.055) / 1.055)^2.4)
    B: 160/255 = 0.62745 → 0.351533  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.248637
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.294744
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.327887
  3. 3. cube root

    l′ = ∛0.248637 = 0.628814
    m′ = ∛0.294744 = 0.665500
    s′ = ∛0.327887 = 0.689564
  4. 4. LMS′ → Oklab

    L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.65768
    a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.06172
    b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.02041
  5. 5. Oklab → OKLCH

    C = √(a² + b²) = 0.06501
    H = atan2(b, a) = 198.298°
    L = 0.65768
  6. 6. OKLCH

    oklch(0.65768 0.06501 198.298)
    rounded: oklch(0.658 0.065 198.3)

All formats

HEX
#5f9ea0
RGB
rgb(95 158 160)
RGB (legacy)
rgb(95, 158, 160)
HSL
hsl(181.85 25.49% 50.00%) → hsl(182 25% 50%)
HWB
hwb(182 37% 37%)
OKLCH
oklch(0.658 0.065 198.3) · oklch(65.8% 0.065 198.3)
OKLab
oklab(0.658 -0.062 -0.020)
Lab (D50)
lab(60.95 -20.74 -7.79)
LCH (D50)
lch(60.95 22.16 200.59)
Display P3
color(display-p3 0.4299 0.6134 0.6236)
Linear sRGB
color(srgb-linear 0.1144 0.3419 0.3515)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #5f9ea0;
  color: rgb(95 158 160);
  color: hsl(182 25% 50%);
  color: oklch(0.658 0.065 198.3);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.658 0.065 198.3);
}
/* arbitrary values */
class="text-[#5f9ea0] bg-[oklch(0.658_0.065_198.3)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4299 0.6134 0.6236); }
}

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

  • #71B1B3 · oklch(0.718 0.065 198.3) · ΔL +0.06
  • #4D8C8E · oklch(0.598 0.065 198.3) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?