RGB to HEX: #27272A
Also known as: Tailwind zinc-800, Tailwind v3 zinc-800
Result
rgb(39 39 42) → #27272A
Values are shown at full precision, so converting back gives exactly #27272a. 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. base 10 → base 16
R = 39 = 2×16 + 7 → 27 G = 39 = 2×16 + 7 → 27 B = 42 = 2×16 + 10 → 2A
2. pairs → HEX
27 27 2A → #27272A
All formats
- HEX
- #27272a
- RGB
- rgb(39 39 42)
- RGB (legacy)
- rgb(39, 39, 42)
- HSL
- hsl(240.00 3.70% 15.88%) → hsl(240 4% 16%)
- HWB
- hwb(240 15% 84%)
- OKLCH
- oklch(0.274 0.005 286.0) · oklch(27.4% 0.005 286.0)
- OKLab
- oklab(0.274 0.002 -0.005)
- Lab (D50)
- lab(15.73 0.56 -1.98)
- LCH (D50)
- lch(15.73 2.06 285.72)
- Display P3
- color(display-p3 0.1529 0.1529 0.1637)
- Linear sRGB
- color(srgb-linear 0.0203 0.0203 0.0232)
Gamut: sRGB and Display P3
#27272A is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.159 and Display P3 reaches 0.162; this color uses 3% of the sRGB chroma available.
CSS snippets
.element {
color: #27272a;
color: rgb(39 39 42);
color: hsl(240 4% 16%);
color: oklch(0.274 0.005 286.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.274 0.005 286.0);
}
/* arbitrary values */
class="text-[#27272a] bg-[oklch(0.274_0.005_286.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1529 0.1529 0.1637); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #27272a calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- neutral-800#262626
- mist-800#22292B
- stone-800#292524
- taupe-800#2B2422
- mauve-800#2A212C
- olive-800#2B2B22
- v3 gray-800#1F2937
- gray-800#1E2939
Lighter and darker, same hue and chroma
- #363639 · oklch(0.334 0.005 286.0) · ΔL +0.06
- #19191C · oklch(0.214 0.005 286.0) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?