HEX to RGB: #334155
Also known as: Tailwind v3 slate-700
Result
#334155 → rgb(51 65 85)
Values are shown at full precision, so converting back gives exactly #334155. 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. HEX → pairs
#334155 → 33 | 41 | 55
2. base 16 → base 10
R = 33₁₆ = 3×16 + 3 = 51 G = 41₁₆ = 4×16 + 1 = 65 B = 55₁₆ = 5×16 + 5 = 85
3. RGB
rgb(51 65 85)
All formats
- HEX
- #334155
- RGB
- rgb(51 65 85)
- RGB (legacy)
- rgb(51, 65, 85)
- HSL
- hsl(215.29 25.00% 26.67%) → hsl(215 25% 27%)
- HWB
- hwb(215 20% 67%)
- OKLCH
- oklch(0.372 0.039 257.3) · oklch(37.2% 0.039 257.3)
- OKLab
- oklab(0.372 -0.009 -0.038)
- Lab (D50)
- lab(26.95 -1.48 -14.02)
- LCH (D50)
- lch(26.95 14.10 263.99)
- Display P3
- color(display-p3 0.2109 0.2533 0.3266)
- Linear sRGB
- color(srgb-linear 0.0331 0.0529 0.0908)
Gamut: sRGB and Display P3
#334155 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.133 and Display P3 reaches 0.170; this color uses 29% of the sRGB chroma available.
CSS snippets
.element {
color: #334155;
color: rgb(51 65 85);
color: hsl(215 25% 27%);
color: oklch(0.372 0.039 257.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.372 0.039 257.3);
}
/* arbitrary values */
class="text-[#334155] bg-[oklch(0.372_0.039_257.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2109 0.2533 0.3266); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #334155 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- gray-700#364153
- slate-700#314158
- v3 gray-700#374151
- zinc-700#3F3F46
- mist-700#394447
- neutral-700#404040
- mauve-700#463947
- v3 cyan-900#164E63
Lighter and darker, same hue and chroma
- #435166 · oklch(0.432 0.039 257.3) · ΔL +0.06
- #243145 · oklch(0.312 0.039 257.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?