OKLCH to HEX: #9CA3AF
Also known as: Tailwind v3 gray-400
Result
oklch(0.71366 0.01918 261.325) → #9CA3AF
Values are shown at full precision, so converting back gives exactly #9ca3af. 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. input
oklch(0.71366 0.01918 261.325)
2. OKLCH → Oklab
a = C·cos H = -0.00289 b = C·sin H = -0.01896
3. Oklab → LMS′
l′ = L + 0.3963·a + 0.2158·b = 0.708422 m′ = L − 0.1056·a − 0.0639·b = 0.715176 s′ = L − 0.0895·a − 1.2915·b = 0.738406
4. cube
l = 0.708422³ = 0.355529 m = 0.715176³ = 0.365796 s = 0.738406³ = 0.402611
5. LMS → linear sRGB
R = 4.0767·l − 3.3077·m + 0.2310·s = 0.332445 G = −1.2684·l + 2.6098·m − 0.3413·s = 0.366253 B = −0.0042·l − 0.7034·m + 1.7076·s = 0.428705
6. linear → sRGB, × 255
R = 0.61176 × 255 = 156.00 → 156 G = 0.63922 × 255 = 163.00 → 163 B = 0.68629 × 255 = 175.00 → 175
7. RGB → HEX
#9CA3AF
All formats
- HEX
- #9ca3af
- RGB
- rgb(156 163 175)
- RGB (legacy)
- rgb(156, 163, 175)
- HSL
- hsl(217.89 10.61% 64.90%) → hsl(218 11% 65%)
- HWB
- hwb(218 61% 31%)
- OKLCH
- oklch(0.714 0.019 261.3) · oklch(71.4% 0.019 261.3)
- OKLab
- oklab(0.714 -0.003 -0.019)
- Lab (D50)
- lab(66.71 -0.75 -7.14)
- LCH (D50)
- lch(66.71 7.18 264.00)
- Display P3
- color(display-p3 0.6168 0.6383 0.6818)
- Linear sRGB
- color(srgb-linear 0.3325 0.3663 0.4287)
Gamut: sRGB and Display P3
#9CA3AF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.149 and Display P3 reaches 0.162; this color uses 13% of the sRGB chroma available.
CSS snippets
.element {
color: #9ca3af;
color: rgb(156 163 175);
color: hsl(218 11% 65%);
color: oklch(0.714 0.019 261.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.714 0.019 261.3);
}
/* arbitrary values */
class="text-[#9ca3af] bg-[oklch(0.714_0.019_261.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.6168 0.6383 0.6818); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9ca3af calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- gray-400#99A1AF
- v3 zinc-400#A1A1AA
- zinc-400#9F9FA9
- v3 slate-400#94A3B8
- mist-400#9CA8AB
- v3 neutral-400#A3A3A3
- neutral-400#A1A1A1
- mauve-400#A89EA9
Lighter and darker, same hue and chroma
- #AFB6C2 · oklch(0.774 0.019 261.3) · ΔL +0.06
- #8A919C · oklch(0.654 0.019 261.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?