HEX to OKLCH: #99A1AF
Also known as: Tailwind gray-400
Result
#99A1AF → oklch(0.707 0.022 261.7)
Values are shown at full precision, so converting back gives exactly #99a1af. 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: 153/255 = 0.60000 → 0.318547 (((x + 0.055) / 1.055)^2.4) G: 161/255 = 0.63137 → 0.356400 (((x + 0.055) / 1.055)^2.4) B: 175/255 = 0.68627 → 0.428690 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.344515 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.356143 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.398599
3. cube root
l′ = ∛0.344515 = 0.701029 m′ = ∛0.356143 = 0.708829 s′ = ∛0.398599 = 0.735945
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.70708 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00321 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.02213
5. Oklab → OKLCH
C = √(a² + b²) = 0.02236 H = atan2(b, a) = 261.749° L = 0.70708
6. OKLCH
oklch(0.70708 0.02236 261.749) rounded: oklch(0.707 0.022 261.7)
All formats
- HEX
- #99a1af
- RGB
- rgb(153 161 175)
- RGB (legacy)
- rgb(153, 161, 175)
- HSL
- hsl(218.18 12.09% 64.31%) → hsl(218 12% 64%)
- HWB
- hwb(218 60% 31%)
- OKLCH
- oklch(0.707 0.022 261.7) · oklch(70.7% 0.022 261.7)
- OKLab
- oklab(0.707 -0.003 -0.022)
- Lab (D50)
- lab(65.93 -0.79 -8.32)
- LCH (D50)
- lch(65.93 8.35 264.59)
- Display P3
- color(display-p3 0.6057 0.6304 0.6811)
- Linear sRGB
- color(srgb-linear 0.3185 0.3564 0.4287)
Gamut: sRGB and Display P3
#99A1AF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.153 and Display P3 reaches 0.165; this color uses 15% of the sRGB chroma available.
CSS snippets
.element {
color: #99a1af;
color: rgb(153 161 175);
color: hsl(218 12% 64%);
color: oklch(0.707 0.022 261.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.707 0.022 261.7);
}
/* arbitrary values */
class="text-[#99a1af] bg-[oklch(0.707_0.022_261.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.6057 0.6304 0.6811); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #99a1af calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 gray-400#9CA3AF
- zinc-400#9F9FA9
- v3 zinc-400#A1A1AA
- v3 slate-400#94A3B8
- slate-400#90A1B9
- mauve-400#A89EA9
- neutral-400#A1A1A1
- mist-400#9CA8AB
Lighter and darker, same hue and chroma
- #ACB4C2 · oklch(0.767 0.022 261.7) · ΔL +0.06
- #878F9C · oklch(0.647 0.022 261.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?