HEX in OKLCH: #0F172A
Auch bekannt als: Tailwind v3 slate-900
Ergebnis
#0F172A → oklch(0.208 0.040 265.8)
Die Werte stehen in voller Genauigkeit, die Rückrechnung ergibt exakt #0f172a. 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. sRGB → linear
R: 15/255 = 0.05882 → 0.004777 (((x + 0.055) / 1.055)^2.4) G: 23/255 = 0.09020 → 0.008568 (((x + 0.055) / 1.055)^2.4) B: 42/255 = 0.16471 → 0.023153 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.007756 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.009331 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.017422
3. cube root
l′ = ∛0.007756 = 0.197943 m′ = ∛0.009331 = 0.210529 s′ = ∛0.017422 = 0.259237
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.20768 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00295 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.03972
5. Oklab → OKLCH
C = √(a² + b²) = 0.03982 H = atan2(b, a) = 265.755° L = 0.20768
6. OKLCH
oklch(0.20768 0.03982 265.755) rounded: oklch(0.208 0.040 265.8)
Alle Formate
- HEX
- #0f172a
- RGB
- rgb(15 23 42)
- RGB (legacy)
- rgb(15, 23, 42)
- HSL
- hsl(222.22 47.37% 11.18%) → hsl(222 47% 11%)
- HWB
- hwb(222 6% 84%)
- OKLCH
- oklch(0.208 0.040 265.8) · oklch(20.8% 0.040 265.8)
- OKLab
- oklab(0.208 -0.003 -0.040)
- Lab (D50)
- lab(7.78 1.59 -14.30)
- LCH (D50)
- lch(7.78 14.38 276.34)
- Display P3
- color(display-p3 0.0653 0.0893 0.1592)
- Linear sRGB
- color(srgb-linear 0.0048 0.0086 0.0232)
Gamut: sRGB und Display P3
#0F172A 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.142, Display P3 von 0.142; diese Farbe nutzt 28 % der verfügbaren sRGB-Chroma.
CSS-Snippets
.element {
color: #0f172a;
color: rgb(15 23 42);
color: hsl(222 47% 11%);
color: oklch(0.208 0.040 265.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.208 0.040 265.8);
}
/* arbitrary values */
class="text-[#0f172a] bg-[oklch(0.208_0.040_265.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.0653 0.0893 0.1592); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #0f172a calc(l - 0.1) c h); }Ähnliche Farben
Nächste Farben in den Paletten von Tailwind und CSS (OKLab-Abstand).
- slate-900#0F172B
- gray-900#101828
- v3 gray-900#111827
- mauve-900#1D161E
- zinc-900#18181B
- mist-900#161B1D
- neutral-900#171717
- stone-900#1C1917
Heller und dunkler, gleicher Farbton und gleiche Chroma
- #1D2539 · oklch(0.268 0.040 265.8) · ΔL +0.06
- #04091B · oklch(0.148 0.040 265.8) · ΔL −0.06