RGB to HEX: #1E2939
Also known as: Tailwind gray-800
Result
rgb(30 41 57) → #1E2939
Values are shown at full precision, so converting back gives exactly #1e2939. 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 = 30 = 1×16 + 14 → 1E G = 41 = 2×16 + 9 → 29 B = 57 = 3×16 + 9 → 39
2. pairs → HEX
1E 29 39 → #1E2939
All formats
- HEX
- #1e2939
- RGB
- rgb(30 41 57)
- RGB (legacy)
- rgb(30, 41, 57)
- HSL
- hsl(215.56 31.03% 17.06%) → hsl(216 31% 17%)
- HWB
- hwb(216 12% 78%)
- OKLCH
- oklch(0.278 0.034 257.7) · oklch(27.8% 0.034 257.7)
- OKLab
- oklab(0.278 -0.007 -0.033)
- Lab (D50)
- lab(16.14 -1.02 -11.97)
- LCH (D50)
- lch(16.14 12.01 265.13)
- Display P3
- color(display-p3 0.1264 0.1595 0.2183)
- Linear sRGB
- color(srgb-linear 0.0130 0.0222 0.0409)
Gamut: sRGB and Display P3
#1E2939 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.102 and Display P3 reaches 0.129; this color uses 33% of the sRGB chroma available.
CSS snippets
.element {
color: #1e2939;
color: rgb(30 41 57);
color: hsl(216 31% 17%);
color: oklch(0.278 0.034 257.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.278 0.034 257.7);
}
/* arbitrary values */
class="text-[#1e2939] bg-[oklch(0.278_0.034_257.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1264 0.1595 0.2183); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #1e2939 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 slate-800#1E293B
- v3 gray-800#1F2937
- slate-800#1D293D
- mist-800#22292B
- zinc-800#27272A
- mauve-800#2A212C
- neutral-800#262626
- v3 sky-950#082F49
Lighter and darker, same hue and chroma
- #2D3849 · oklch(0.338 0.034 257.7) · ΔL +0.06
- #101B2A · oklch(0.218 0.034 257.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?