OKLCH to HEX: #EC003F

Also known as: Tailwind rose-600

Result

oklch(0.59679 0.23956 19.695) → #EC003F

Values are shown at full precision, so converting back gives exactly #ec003f. 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. input

    oklch(0.59679 0.23956 19.695)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.22555
    b = C·sin H = 0.08073
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.703605
    m′ = L − 0.1056·a − 0.0639·b = 0.567826
    s′ = L − 0.0895·a − 1.2915·b = 0.472339
  4. 4. cube

    l = 0.703605³ = 0.348327
    m = 0.567826³ = 0.183082
    s = 0.472339³ = 0.105381
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.838797
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.000000
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.049705
  6. 6. linear → sRGB, × 255

    R = 0.92549 × 255 = 236.00 → 236
    G = 0.00000 × 255 = 0.00 → 0
    B = 0.24706 × 255 = 63.00 → 63
  7. 7. RGB → HEX

    #EC003F

All formats

HEX
#ec003f
RGB
rgb(236 0 63)
RGB (legacy)
rgb(236, 0, 63)
HSL
hsl(343.98 100.00% 46.27%) → hsl(344 100% 46%)
HWB
hwb(344 0% 7%)
OKLCH
oklch(0.597 0.240 19.7) · oklch(59.7% 0.240 19.7)
OKLab
oklab(0.597 0.226 0.081)
Lab (D50)
lab(50.65 77.01 37.86)
LCH (D50)
lch(50.65 85.81 26.18)
Display P3
color(display-p3 0.8488 0.1823 0.2708)
Linear sRGB
color(srgb-linear 0.8388 0.0000 0.0497)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #ec003f;
  color: rgb(236 0 63);
  color: hsl(344 100% 46%);
  color: oklch(0.597 0.240 19.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.597 0.240 19.7);
}
/* arbitrary values */
class="text-[#ec003f] bg-[oklch(0.597_0.240_19.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8488 0.1823 0.2708); }
}

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

  • #FF3051 · oklch(0.657 0.240 19.7) · ΔL +0.06
  • #D6002D · oklch(0.537 0.240 19.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?