HEX naar HSL: #7C3AED
Ook bekend als: Tailwind v3 violet-600
Resultaat
#7C3AED → hsl(262 83% 58%)
Waarden staan op volle precisie, dus terugrekenen geeft exact #7c3aed. 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.4863 G = 0.2275 B = 0.9294
2. max, min, Δ
max = 0.9294 min = 0.2275 Δ = max − min = 0.7020
3. L
L = (max + min) / 2 = 0.5784 = 57.84%
4. S
S = Δ / (1 − |2L − 1|) = 0.8326 = 83.26%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.4863 − 0.2275) / 0.7020 + 4) = 262.12°
6. HSL
hsl(262.12 83.26% 57.84%)
Alle formaten
- HEX
- #7c3aed
- RGB
- rgb(124 58 237)
- RGB (legacy)
- rgb(124, 58, 237)
- HSL
- hsl(262.12 83.26% 57.84%) → hsl(262 83% 58%)
- HWB
- hwb(262 23% 7%)
- OKLCH
- oklch(0.541 0.247 293.0) · oklch(54.1% 0.247 293.0)
- OKLab
- oklab(0.541 0.096 -0.227)
- Lab (D50)
- lab(42.23 56.98 -80.61)
- LCH (D50)
- lch(42.23 98.71 305.25)
- Display P3
- color(display-p3 0.4532 0.2417 0.8950)
- Linear sRGB
- color(srgb-linear 0.2016 0.0423 0.8469)
Gamut: sRGB en Display P3
#7C3AED 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.303; deze kleur gebruikt 87% van de beschikbare sRGB-chroma.
CSS-snippets
.element {
color: #7c3aed;
color: rgb(124 58 237);
color: hsl(262 83% 58%);
color: oklch(0.541 0.247 293.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.541 0.247 293.0);
}
/* arbitrary values */
class="text-[#7c3aed] bg-[oklch(0.541_0.247_293.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4532 0.2417 0.8950); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7c3aed calc(l - 0.1) c h); }Kleuren in de buurt
Dichtstbijzijnde kleuren in de Tailwind- en CSS-paletten (OKLab-afstand).
- violet-600#7F22FE
- blueviolet#8A2BE2
- v3 purple-600#9333EA
- v3 violet-700#6D28D9
- violet-700#7008E7
- violet-500#8E51FF
- v3 purple-700#7E22CE
- purple-700#8200DB
Lichter en donkerder, dezelfde tint en chroma
- #8D51FF · oklch(0.601 0.247 293.0) · ΔL +0.06
- #6C1FD8 · oklch(0.481 0.247 293.0) · ΔL −0.06