HEX to OKLCH: #C10007
Also known as: Tailwind red-700
Result
#C10007 → oklch(0.509 0.209 28.5)
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. sRGB → linear
R: 193/255 = 0.75686 → 0.533276 (((x + 0.055) / 1.055)^2.4) G: 0/255 = 0.00000 → 0.000000 (÷ 12.92) B: 7/255 = 0.02745 → 0.002125 (÷ 12.92)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.219937 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.113231 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.048428
3. cube root
l′ = ∛0.219937 = 0.603624 m′ = ∛0.113231 = 0.483788 s′ = ∛0.048428 = 0.364501
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.50949 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.18328 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.09957
5. Oklab → OKLCH
C = √(a² + b²) = 0.20858 H = atan2(b, a) = 28.513° L = 0.50949
6. OKLCH
oklch(0.50949 0.20858 28.513) rounded: oklch(0.509 0.209 28.5)
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).
- v3 red-700#B91C1C
- firebrick#B22222
- rose-700#C70036
- v3 rose-700#BE123C
- orange-700#CA3500
- brown#A52A2A
- v3 orange-700#C2410C
- v3 red-600#DC2626
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
Guides: What is OKLCH?