HEX to OKLCH: #DC143C

Also known as: CSS crimson

Result

#DC143C → oklch(0.571 0.222 20.1)

Values are shown at full precision, so converting back gives exactly #dc143c. 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: 220/255 = 0.86275 → 0.715694  (((x + 0.055) / 1.055)^2.4)
    G: 20/255 = 0.07843 → 0.006995  (((x + 0.055) / 1.055)^2.4)
    B: 60/255 = 0.23529 → 0.045186  (((x + 0.055) / 1.055)^2.4)
  2. 2. linear sRGB → LMS

    l = 0.4122·R + 0.5363·G + 0.0514·B = 0.301101
    m = 0.2119·R + 0.6807·G + 0.1074·B = 0.161273
    s = 0.0883·R + 0.2817·G + 0.6300·B = 0.093635
  3. 3. cube root

    l′ = ∛0.301101 = 0.670251
    m′ = ∛0.161273 = 0.544319
    s′ = ∛0.093635 = 0.454094
  4. 4. LMS′ → Oklab

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

    C = √(a² + b²) = 0.22194
    H = atan2(b, a) = 20.087°
    L = 0.57119
  6. 6. OKLCH

    oklch(0.57119 0.22194 20.087)
    rounded: oklch(0.571 0.222 20.1)

All formats

HEX
#dc143c
RGB
rgb(220 20 60)
RGB (legacy)
rgb(220, 20, 60)
HSL
hsl(348.00 83.33% 47.06%) → hsl(348 83% 47%)
HWB
hwb(348 8% 14%)
OKLCH
oklch(0.571 0.222 20.1) · oklch(57.1% 0.222 20.1)
OKLab
oklab(0.571 0.208 0.076)
Lab (D50)
lab(47.88 71.28 35.48)
LCH (D50)
lch(47.88 79.62 26.46)
Display P3
color(display-p3 0.7917 0.1915 0.2574)
Linear sRGB
color(srgb-linear 0.7157 0.0070 0.0452)

Gamut: sRGB and Display P3

#DC143C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.229 and Display P3 reaches 0.259; this color uses 97% of the sRGB chroma available.

CSS snippets

.element {
  color: #dc143c;
  color: rgb(220 20 60);
  color: hsl(348 83% 47%);
  color: oklch(0.571 0.222 20.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.571 0.222 20.1);
}
/* arbitrary values */
class="text-[#dc143c] bg-[oklch(0.571_0.222_20.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7917 0.1915 0.2574); }
}

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

  • #F2354D · oklch(0.631 0.222 20.1) · ΔL +0.06
  • #C6002B · oklch(0.511 0.222 20.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?