HSL in HEX: #1F2937
Auch bekannt als: Tailwind v3 gray-800
Ergebnis
hsl(215.00 27.91% 16.86%) → #1F2937
Die Werte stehen in voller Genauigkeit, die Rückrechnung ergibt exakt #1f2937. Die gerundete Form fügst du üblicherweise in CSS ein.
Rechenweg Schritt für Schritt
Jede Zahl wird aus der Eingabe berechnet, nichts ist nachgeschlagen.
1. input
H = 215.00°, S = 27.91%, L = 16.86%
2. C
C = (1 − |2L − 1|) × S = 0.09411
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.03921 (H / 60° = 3.5833, sector 3)
4. m
m = L − C / 2 = 0.12154
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.00000, 0.03921, 0.09411) R = round((0.00000 + 0.12154) × 255) = 31 G = round((0.03921 + 0.12154) × 255) = 41 B = round((0.09411 + 0.12154) × 255) = 55
6. RGB → HEX
#1F2937
Alle Formate
- HEX
- #1f2937
- RGB
- rgb(31 41 55)
- RGB (legacy)
- rgb(31, 41, 55)
- HSL
- hsl(215.00 27.91% 16.86%) → hsl(215 28% 17%)
- HWB
- hwb(215 12% 78%)
- OKLCH
- oklch(0.278 0.030 256.8) · oklch(27.8% 0.030 256.8)
- OKLab
- oklab(0.278 -0.007 -0.029)
- Lab (D50)
- lab(16.14 -1.18 -10.57)
- LCH (D50)
- lch(16.14 10.64 263.63)
- Display P3
- color(display-p3 0.1294 0.1596 0.2110)
- Linear sRGB
- color(srgb-linear 0.0137 0.0222 0.0382)
Gamut: sRGB und Display P3
#1F2937 ist eine Hex-Farbe und liegt damit in sRGB und folglich in Display P3. Bei dieser Helligkeit und diesem Farbton erreicht sRGB eine Chroma von 0.098, Display P3 von 0.125; diese Farbe nutzt 30 % der verfügbaren sRGB-Chroma.
CSS-Snippets
.element {
color: #1f2937;
color: rgb(31 41 55);
color: hsl(215 28% 17%);
color: oklch(0.278 0.030 256.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.278 0.030 256.8);
}
/* arbitrary values */
class="text-[#1f2937] bg-[oklch(0.278_0.030_256.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.1294 0.1596 0.2110); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #1f2937 calc(l - 0.1) c h); }Ähnliche Farben
Nächste Farben in den Paletten von Tailwind und CSS (OKLab-Abstand).
- gray-800#1E2939
- v3 slate-800#1E293B
- slate-800#1D293D
- mist-800#22292B
- zinc-800#27272A
- neutral-800#262626
- mauve-800#2A212C
- stone-800#292524
Heller und dunkler, gleicher Farbton und gleiche Chroma
- #2E3847 · oklch(0.338 0.030 256.8) · ΔL +0.06
- #111B28 · oklch(0.218 0.030 256.8) · ΔL −0.06