HEX to OKLCH: #40E0D0

Also known as: CSS turquoise

Result

#40E0D0 → oklch(0.822 0.131 185.1)

Values are shown at full precision, so converting back gives exactly #40e0d0. 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: 64/255 = 0.25098 → 0.051269  (((x + 0.055) / 1.055)^2.4)
    G: 224/255 = 0.87843 → 0.745404  (((x + 0.055) / 1.055)^2.4)
    B: 208/255 = 0.81569 → 0.630757  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.453369
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.586002
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.611885
  3. 3. cube root

    l′ = ∛0.453369 = 0.768217
    m′ = ∛0.586002 = 0.836822
    s′ = ∛0.611885 = 0.848965
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.13074
    H = atan2(b, a) = 185.089°
    L = 0.82233
  6. 6. OKLCH

    oklch(0.82233 0.13074 185.089)
    rounded: oklch(0.822 0.131 185.1)

All formats

HEX
#40e0d0
RGB
rgb(64 224 208)
RGB (legacy)
rgb(64, 224, 208)
HSL
hsl(174.00 72.07% 56.47%) → hsl(174 72% 56%)
HWB
hwb(174 25% 12%)
OKLCH
oklch(0.822 0.131 185.1) · oklch(82.2% 0.131 185.1)
OKLab
oklab(0.822 -0.130 -0.012)
Lab (D50)
lab(80.96 -45.14 -4.68)
LCH (D50)
lch(80.96 45.38 185.92)
Display P3
color(display-p3 0.4547 0.8663 0.8148)
Linear sRGB
color(srgb-linear 0.0513 0.7454 0.6308)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #40e0d0;
  color: rgb(64 224 208);
  color: hsl(174 72% 56%);
  color: oklch(0.822 0.131 185.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.822 0.131 185.1);
}
/* arbitrary values */
class="text-[#40e0d0] bg-[oklch(0.822_0.131_185.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4547 0.8663 0.8148); }
}

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

  • #5BF4E4 · oklch(0.882 0.131 185.1) · ΔL +0.06
  • #1BCCBD · oklch(0.762 0.131 185.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?