HEX to HSL: #314158
Also known as: Tailwind slate-700
Result
#314158 → hsl(215 28% 27%)
Values are shown at full precision, so converting back gives exactly #314158. 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. RGB ÷ 255
R = 0.1922 G = 0.2549 B = 0.3451
2. max, min, Δ
max = 0.3451 min = 0.1922 Δ = max − min = 0.1529
3. L
L = (max + min) / 2 = 0.2686 = 26.86%
4. S
S = Δ / (1 − |2L − 1|) = 0.2847 = 28.47%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.1922 − 0.2549) / 0.1529 + 4) = 215.38°
6. HSL
hsl(215.38 28.47% 26.86%)
All formats
- HEX
- #314158
- RGB
- rgb(49 65 88)
- RGB (legacy)
- rgb(49, 65, 88)
- HSL
- hsl(215.38 28.47% 26.86%) → hsl(215 28% 27%)
- HWB
- hwb(215 19% 65%)
- OKLCH
- oklch(0.372 0.045 257.4) · oklch(37.2% 0.045 257.4)
- OKLab
- oklab(0.372 -0.010 -0.044)
- Lab (D50)
- lab(26.92 -1.43 -16.03)
- LCH (D50)
- lch(26.92 16.09 264.91)
- Display P3
- color(display-p3 0.2049 0.2531 0.3375)
- Linear sRGB
- color(srgb-linear 0.0307 0.0529 0.0976)
Gamut: sRGB and Display P3
#314158 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.134 and Display P3 reaches 0.171; this color uses 33% of the sRGB chroma available.
CSS snippets
.element {
color: #314158;
color: rgb(49 65 88);
color: hsl(215 28% 27%);
color: oklch(0.372 0.045 257.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.372 0.045 257.4);
}
/* arbitrary values */
class="text-[#314158] bg-[oklch(0.372_0.045_257.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2049 0.2531 0.3375); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #314158 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 slate-700#334155
- gray-700#364153
- v3 gray-700#374151
- zinc-700#3F3F46
- mist-700#394447
- mauve-700#463947
- v3 cyan-900#164E63
- neutral-700#404040
Lighter and darker, same hue and chroma
- #415169 · oklch(0.432 0.045 257.4) · ΔL +0.06
- #223147 · oklch(0.312 0.045 257.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?