HEX in OKLCH: #8B5CF6
Auch bekannt als: Tailwind v3 violet-500
Ergebnis
#8B5CF6 → oklch(0.606 0.219 292.7)
Die Werte stehen in voller Genauigkeit, die Rückrechnung ergibt exakt #8b5cf6. 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: 139/255 = 0.54510 → 0.258183 (((x + 0.055) / 1.055)^2.4) G: 92/255 = 0.36078 → 0.107023 (((x + 0.055) / 1.055)^2.4) B: 246/255 = 0.96471 → 0.921582 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.211240 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.226536 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.633526
3. cube root
l′ = ∛0.211240 = 0.595560 m′ = ∛0.226536 = 0.609601 s′ = ∛0.633526 = 0.858858
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.60563 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.08454 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = -0.20193
5. Oklab → OKLCH
C = √(a² + b²) = 0.21892 H = atan2(b, a) = 292.717° L = 0.60563
6. OKLCH
oklch(0.60563 0.21892 292.717) rounded: oklch(0.606 0.219 292.7)
Alle Formate
- HEX
- #8b5cf6
- RGB
- rgb(139 92 246)
- RGB (legacy)
- rgb(139, 92, 246)
- HSL
- hsl(258.31 89.53% 66.27%) → hsl(258 90% 66%)
- HWB
- hwb(258 36% 4%)
- OKLCH
- oklch(0.606 0.219 292.7) · oklch(60.6% 0.219 292.7)
- OKLab
- oklab(0.606 0.085 -0.202)
- Lab (D50)
- lab(50.69 45.85 -71.80)
- LCH (D50)
- lch(50.69 85.19 302.56)
- Display P3
- color(display-p3 0.5183 0.3688 0.9315)
- Linear sRGB
- color(srgb-linear 0.2582 0.1070 0.9216)
Gamut: sRGB und Display P3
#8B5CF6 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.236, Display P3 von 0.255; diese Farbe nutzt 93 % der verfügbaren sRGB-Chroma.
CSS-Snippets
.element {
color: #8b5cf6;
color: rgb(139 92 246);
color: hsl(258 90% 66%);
color: oklch(0.606 0.219 292.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.606 0.219 292.7);
}
/* arbitrary values */
class="text-[#8b5cf6] bg-[oklch(0.606_0.219_292.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5183 0.3688 0.9315); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #8b5cf6 calc(l - 0.1) c h); }Ähnliche Farben
Nächste Farben in den Paletten von Tailwind und CSS (OKLab-Abstand).
- violet-500#8E51FF
- mediumslateblue#7B68EE
- v3 purple-500#A855F7
- v3 indigo-500#6366F1
- mediumpurple#9370DB
- indigo-500#615FFF
- purple-500#AD46FF
- v3 violet-600#7C3AED
Heller und dunkler, gleicher Farbton und gleiche Chroma
- #9C70FF · oklch(0.666 0.219 292.7) · ΔL +0.06
- #7A48E1 · oklch(0.546 0.219 292.7) · ΔL −0.06