HEX naar HSL: #314158
Ook bekend als: Tailwind slate-700
Resultaat
#314158 → hsl(215 28% 27%)
Waarden staan op volle precisie, dus terugrekenen geeft exact #314158. De afgeronde vorm plak je gewoonlijk in CSS.
Stap-voor-stap berekening
Elk getal wordt uit de invoer berekend, er wordt niets opgezocht.
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%)
Alle formaten
- 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 en Display P3
#314158 is een hexkleur en ligt dus binnen sRGB en daarmee binnen Display P3. Bij deze helderheid en tint haalt sRGB een chroma van 0.134 en Display P3 van 0.171; deze kleur gebruikt 33% van de beschikbare sRGB-chroma.
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); }Kleuren in de buurt
Dichtstbijzijnde kleuren in de Tailwind- en CSS-paletten (OKLab-afstand).
- 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
Lichter en donkerder, dezelfde tint en chroma
- #415169 · oklch(0.432 0.045 257.4) · ΔL +0.06
- #223147 · oklch(0.312 0.045 257.4) · ΔL −0.06