OKLCH to HEX: #C70036

Also known as: Tailwind rose-700

Result

oklch(0.52538 0.21070 18.944) → #C70036

Values are shown at full precision, so converting back gives exactly #c70036. 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.52538 0.21070 18.944)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.19929
    b = C·sin H = 0.06840
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.619127
    m′ = L − 0.1056·a − 0.0639·b = 0.499975
    s′ = L − 0.0895·a − 1.2915·b = 0.419206
  4. 4. cube

    l = 0.619127³ = 0.237322
    m = 0.499975³ = 0.124981
    s = 0.419206³ = 0.073669
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.571115
    G = −1.2684·l + 2.6098·m − 0.3413·s = -0.000002
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.036888
  6. 6. linear → sRGB, × 255

    R = 0.78039 × 255 = 199.00 → 199
    G = 0.00000 × 255 = 0.00 → 0
    B = 0.21176 × 255 = 54.00 → 54
  7. 7. RGB → HEX

    #C70036

All formats

HEX
#c70036
RGB
rgb(199 0 54)
RGB (legacy)
rgb(199, 0, 54)
HSL
hsl(343.72 100.00% 39.02%) → hsl(344 100% 39%)
HWB
hwb(344 0% 22%)
OKLCH
oklch(0.525 0.211 18.9) · oklch(52.5% 0.211 18.9)
OKLab
oklab(0.525 0.199 0.068)
Lab (D50)
lab(42.66 67.81 31.86)
LCH (D50)
lch(42.66 74.92 25.16)
Display P3
color(display-p3 0.7151 0.1471 0.2303)
Linear sRGB
color(srgb-linear 0.5711 0.0000 0.0369)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #c70036;
  color: rgb(199 0 54);
  color: hsl(344 100% 39%);
  color: oklch(0.525 0.211 18.9);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.525 0.211 18.9);
}
/* arbitrary values */
class="text-[#c70036] bg-[oklch(0.525_0.211_18.9)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.7151 0.1471 0.2303); }
}

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

  • #DD2A47 · oklch(0.585 0.211 18.9) · ΔL +0.06
  • #B10025 · oklch(0.465 0.211 18.9) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?