OKLCH to HEX: #C10007

Also known as: Tailwind red-700

Result

oklch(0.50949 0.20858 28.513) → #C10007

Values are shown at full precision, so converting back gives exactly #c10007. 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.50949 0.20858 28.513)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.18328
    b = C·sin H = 0.09957
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.603618
    m′ = L − 0.1056·a − 0.0639·b = 0.483785
    s′ = L − 0.0895·a − 1.2915·b = 0.364499
  4. 4. cube

    l = 0.603618³ = 0.219931
    m = 0.483785³ = 0.113229
    s = 0.364499³ = 0.048427
  5. 5. LMS → linear sRGB

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

    R = 0.75685 × 255 = 193.00 → 193
    G = 0.00001 × 255 = 0.00 → 0
    B = 0.02746 × 255 = 7.00 → 7
  7. 7. RGB → HEX

    #C10007

All formats

HEX
#c10007
RGB
rgb(193 0 7)
RGB (legacy)
rgb(193, 0, 7)
HSL
hsl(357.82 100.00% 37.84%) → hsl(358 100% 38%)
HWB
hwb(358 0% 24%)
OKLCH
oklch(0.509 0.209 28.5) · oklch(50.9% 0.209 28.5)
OKLab
oklab(0.509 0.183 0.100)
Lab (D50)
lab(41.02 65.57 54.05)
LCH (D50)
lch(41.02 84.98 39.50)
Display P3
color(display-p3 0.6934 0.1415 0.1064)
Linear sRGB
color(srgb-linear 0.5333 0.0000 0.0021)

Gamut: sRGB and Display P3

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

CSS snippets

.element {
  color: #c10007;
  color: rgb(193 0 7);
  color: hsl(358 100% 38%);
  color: oklch(0.509 0.209 28.5);
}

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

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.6934 0.1415 0.1064); }
}

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

  • #D72A22 · oklch(0.569 0.209 28.5) · ΔL +0.06
  • #AB0000 · oklch(0.449 0.209 28.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?