HEX in OKLCH: #101828
Auch bekannt als: Tailwind gray-900
Ergebnis
#101828 → oklch(0.210 0.034 263.4)
Die Werte stehen in voller Genauigkeit, die Rückrechnung ergibt exakt #101828. 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: 16/255 = 0.06275 → 0.005182 (((x + 0.055) / 1.055)^2.4) G: 24/255 = 0.09412 → 0.009134 (((x + 0.055) / 1.055)^2.4) B: 40/255 = 0.15686 → 0.021219 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.008126 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.009594 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.016398
3. cube root
l′ = ∛0.008126 = 0.201048 m′ = ∛0.009594 = 0.212490 s′ = ∛0.016398 = 0.254058
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.20991 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.00390 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.03391
5. Oklab → OKLCH
C = √(a² + b²) = 0.03413 H = atan2(b, a) = 263.436° L = 0.20991
6. OKLCH
oklch(0.20991 0.03413 263.436) rounded: oklch(0.210 0.034 263.4)
Alle Formate
- HEX
- #101828
- RGB
- rgb(16 24 40)
- RGB (legacy)
- rgb(16, 24, 40)
- HSL
- hsl(220.00 42.86% 10.98%) → hsl(220 43% 11%)
- HWB
- hwb(220 6% 84%)
- OKLCH
- oklch(0.210 0.034 263.4) · oklch(21.0% 0.034 263.4)
- OKLab
- oklab(0.210 -0.004 -0.034)
- Lab (D50)
- lab(8.12 0.58 -12.27)
- LCH (D50)
- lch(8.12 12.29 272.73)
- Display P3
- color(display-p3 0.0691 0.0932 0.1520)
- Linear sRGB
- color(srgb-linear 0.0052 0.0091 0.0212)
Gamut: sRGB und Display P3
#101828 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.111, Display P3 von 0.135; diese Farbe nutzt 31 % der verfügbaren sRGB-Chroma.
CSS-Snippets
.element {
color: #101828;
color: rgb(16 24 40);
color: hsl(220 43% 11%);
color: oklch(0.210 0.034 263.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.210 0.034 263.4);
}
/* arbitrary values */
class="text-[#101828] bg-[oklch(0.210_0.034_263.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.0691 0.0932 0.1520); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #101828 calc(l - 0.1) c h); }Ähnliche Farben
Nächste Farben in den Paletten von Tailwind und CSS (OKLab-Abstand).
- v3 gray-900#111827
- v3 slate-900#0F172A
- slate-900#0F172B
- zinc-900#18181B
- mist-900#161B1D
- mauve-900#1D161E
- neutral-900#171717
- stone-900#1C1917
Heller und dunkler, gleicher Farbton und gleiche Chroma
- #1E2637 · oklch(0.270 0.034 263.4) · ΔL +0.06
- #050B19 · oklch(0.150 0.034 263.4) · ΔL −0.06