HEX naar HSL: #7F22FE
Ook bekend als: Tailwind violet-600
Resultaat
#7F22FE → hsl(265 99% 56%)
Waarden staan op volle precisie, dus terugrekenen geeft exact #7f22fe. 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.4980 G = 0.1333 B = 0.9961
2. max, min, Δ
max = 0.9961 min = 0.1333 Δ = max − min = 0.8627
3. L
L = (max + min) / 2 = 0.5647 = 56.47%
4. S
S = Δ / (1 − |2L − 1|) = 0.9910 = 99.10%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.4980 − 0.1333) / 0.8627 + 4) = 265.36°
6. HSL
hsl(265.36 99.10% 56.47%)
Alle formaten
- HEX
- #7f22fe
- RGB
- rgb(127 34 254)
- RGB (legacy)
- rgb(127, 34, 254)
- HSL
- hsl(265.36 99.10% 56.47%) → hsl(265 99% 56%)
- HWB
- hwb(265 13% 0%)
- OKLCH
- oklch(0.540 0.281 292.9) · oklch(54.0% 0.281 292.9)
- OKLab
- oklab(0.540 0.109 -0.259)
- Lab (D50)
- lab(41.02 68.96 -92.12)
- LCH (D50)
- lch(41.02 115.07 306.82)
- Display P3
- color(display-p3 0.4582 0.1621 0.9580)
- Linear sRGB
- color(srgb-linear 0.2122 0.0160 0.9911)
Gamut: sRGB en Display P3
#7F22FE is een hexkleur en ligt dus binnen sRGB en daarmee binnen Display P3. Bij deze helderheid en tint haalt sRGB een chroma van 0.283 en Display P3 van 0.304; deze kleur gebruikt 99% van de beschikbare sRGB-chroma.
CSS-snippets
.element {
color: #7f22fe;
color: rgb(127 34 254);
color: hsl(265 99% 56%);
color: oklch(0.540 0.281 292.9);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.540 0.281 292.9);
}
/* arbitrary values */
class="text-[#7f22fe] bg-[oklch(0.540_0.281_292.9)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4582 0.1621 0.9580); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7f22fe calc(l - 0.1) c h); }Kleuren in de buurt
Dichtstbijzijnde kleuren in de Tailwind- en CSS-paletten (OKLab-afstand).
- v3 violet-600#7C3AED
- purple-600#9810FA
- blueviolet#8A2BE2
- violet-700#7008E7
- v3 purple-600#9333EA
- purple-700#8200DB
- v3 violet-700#6D28D9
- violet-500#8E51FF
Lichter en donkerder, dezelfde tint en chroma
- #8F40FF · oklch(0.600 0.281 292.9) · ΔL +0.06
- #6F00E8 · oklch(0.480 0.281 292.9) · ΔL −0.06