HEX to HSL: #A684FF
Also known as: Tailwind violet-400
Result
#A684FF → hsl(257 100% 76%)
Values are shown at full precision, so converting back gives exactly #a684ff. The rounded form is what you normally paste into CSS.
Step-by-step math
Every number below is computed from the input, nothing is looked up.
1. RGB ÷ 255
R = 0.6510 G = 0.5176 B = 1.0000
2. max, min, Δ
max = 1.0000 min = 0.5176 Δ = max − min = 0.4824
3. L
L = (max + min) / 2 = 0.7588 = 75.88%
4. S
S = Δ / (1 − |2L − 1|) = 1.0000 = 100.00%
5. H
max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.6510 − 0.5176) / 0.4824 + 4) = 256.59°
6. HSL
hsl(256.59 100.00% 75.88%)
All formats
- HEX
- #a684ff
- RGB
- rgb(166 132 255)
- RGB (legacy)
- rgb(166, 132, 255)
- HSL
- hsl(256.59 100.00% 75.88%) → hsl(257 100% 76%)
- HWB
- hwb(257 52% 0%)
- OKLCH
- oklch(0.699 0.176 294.1) · oklch(69.9% 0.176 294.1)
- OKLab
- oklab(0.699 0.072 -0.161)
- Lab (D50)
- lab(62.58 33.63 -57.54)
- LCH (D50)
- lch(62.58 66.65 300.30)
- Display P3
- color(display-p3 0.6299 0.5228 0.9703)
- Linear sRGB
- color(srgb-linear 0.3813 0.2307 1.0000)
Gamut: sRGB and Display P3
#A684FF is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.176 and Display P3 reaches 0.191; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #a684ff;
color: rgb(166 132 255);
color: hsl(257 100% 76%);
color: oklch(0.699 0.176 294.1);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.699 0.176 294.1);
}
/* arbitrary values */
class="text-[#a684ff] bg-[oklch(0.699_0.176_294.1)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.6299 0.5228 0.9703); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #a684ff calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 violet-400#A78BFA
- v3 purple-400#C084FC
- purple-400#C27AFF
- v3 indigo-400#818CF8
- indigo-400#7C86FF
- mediumpurple#9370DB
- v3 purple-500#A855F7
- cornflowerblue#6495ED
Lighter and darker, same hue and chroma
- #B897FF · oklch(0.759 0.176 294.1) · ΔL +0.06
- #9471EA · oklch(0.639 0.176 294.1) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?