HEX to OKLCH: #A8A29E
Also known as: Tailwind v3 stone-400
Result
#A8A29E → oklch(0.716 0.009 56.3)
Values are shown at full precision, so converting back gives exactly #a8a29e. 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: 168/255 = 0.65882 → 0.391572 (((x + 0.055) / 1.055)^2.4) G: 162/255 = 0.63529 → 0.361307 (((x + 0.055) / 1.055)^2.4) B: 158/255 = 0.61961 → 0.341914 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.372785 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.365638 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.351763
3. cube root
l′ = ∛0.372785 = 0.719702 m′ = ∛0.365638 = 0.715073 s′ = ∛0.351763 = 0.705911
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.71608 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.00503 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.00753
5. Oklab → OKLCH
C = √(a² + b²) = 0.00905 H = atan2(b, a) = 56.259° L = 0.71608
6. OKLCH
oklch(0.71608 0.00905 56.259) rounded: oklch(0.716 0.009 56.3)
All formats
- HEX
- #a8a29e
- RGB
- rgb(168 162 158)
- RGB (legacy)
- rgb(168, 162, 158)
- HSL
- hsl(24.00 5.43% 63.92%) → hsl(24 5% 64%)
- HWB
- hwb(24 62% 34%)
- OKLCH
- oklch(0.716 0.009 56.3) · oklch(71.6% 0.009 56.3)
- OKLab
- oklab(0.716 0.005 0.008)
- Lab (D50)
- lab(67.04 1.70 2.90)
- LCH (D50)
- lch(67.04 3.36 59.61)
- Display P3
- color(display-p3 0.6547 0.6361 0.6215)
- Linear sRGB
- color(srgb-linear 0.3916 0.3613 0.3419)
Gamut: sRGB and Display P3
#A8A29E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.175 and Display P3 reaches 0.199; this color uses 5% of the sRGB chroma available.
CSS snippets
.element {
color: #a8a29e;
color: rgb(168 162 158);
color: hsl(24 5% 64%);
color: oklch(0.716 0.009 56.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.716 0.009 56.3);
}
/* arbitrary values */
class="text-[#a8a29e] bg-[oklch(0.716_0.009_56.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.6547 0.6361 0.6215); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #a8a29e calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- taupe-400#ABA09C
- stone-400#A6A09B
- v3 neutral-400#A3A3A3
- neutral-400#A1A1A1
- v3 zinc-400#A1A1AA
- darkgray#A9A9A9
- mauve-400#A89EA9
- zinc-400#9F9FA9
Lighter and darker, same hue and chroma
- #BBB5B1 · oklch(0.776 0.009 56.3) · ΔL +0.06
- #96908C · oklch(0.656 0.009 56.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?