HEX to OKLCH: #E7000B

Also known as: Tailwind red-600

Result

#E7000B → oklch(0.583 0.239 28.5)

Values are shown at full precision, so converting back gives exactly #e7000b. 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: 231/255 = 0.90588 → 0.799103  (((x + 0.055) / 1.055)^2.4)
    G: 0/255 = 0.00000 → 0.000000  (÷ 12.92)
    B: 11/255 = 0.04314 → 0.003347  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.329579
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.169692
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.072671
  3. 3. cube root

    l′ = ∛0.329579 = 0.690749
    m′ = ∛0.169692 = 0.553631
    s′ = ∛0.072671 = 0.417305
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.23867
    H = atan2(b, a) = 28.476°
    L = 0.58304
  6. 6. OKLCH

    oklch(0.58304 0.23867 28.476)
    rounded: oklch(0.583 0.239 28.5)

All formats

HEX
#e7000b
RGB
rgb(231 0 11)
RGB (legacy)
rgb(231, 0, 11)
HSL
hsl(357.14 100.00% 45.29%) → hsl(357 100% 45%)
HWB
hwb(357 0% 9%)
OKLCH
oklch(0.583 0.239 28.5) · oklch(58.3% 0.239 28.5)
OKLab
oklab(0.583 0.210 0.114)
Lab (D50)
lab(49.25 75.04 61.71)
LCH (D50)
lch(49.25 97.16 39.43)
Display P3
color(display-p3 0.8307 0.1775 0.1367)
Linear sRGB
color(srgb-linear 0.7991 0.0000 0.0033)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #e7000b;
  color: rgb(231 0 11);
  color: hsl(357 100% 45%);
  color: oklch(0.583 0.239 28.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.583 0.239 28.5);
}
/* arbitrary values */
class="text-[#e7000b] bg-[oklch(0.583_0.239_28.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8307 0.1775 0.1367); }
}

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

  • #FD3028 · oklch(0.643 0.239 28.5) · ΔL +0.06
  • #D10000 · oklch(0.523 0.239 28.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?