HEX to HSL: #2E1065

Also known as: Tailwind v3 violet-950

Result

#2E1065 → hsl(261 73% 23%)

Values are shown at full precision, so converting back gives exactly #2e1065. 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. 1. RGB ÷ 255

    R = 0.1804
    G = 0.0627
    B = 0.3961
  2. 2. max, min, Δ

    max = 0.3961
    min = 0.0627
    Δ = max − min = 0.3333
  3. 3. L

    L = (max + min) / 2 = 0.2294 = 22.94%
  4. 4. S

    S = Δ / (1 − |2L − 1|) = 0.7265 = 72.65%
  5. 5. H

    max is B → H = 60° × ((R − G) / Δ + 4) = 60° × ((0.1804 − 0.0627) / 0.3333 + 4) = 261.18°
  6. 6. HSL

    hsl(261.18 72.65% 22.94%)

All formats

HEX
#2e1065
RGB
rgb(46 16 101)
RGB (legacy)
rgb(46, 16, 101)
HSL
hsl(261.18 72.65% 22.94%) → hsl(261 73% 23%)
HWB
hwb(261 6% 60%)
OKLCH
oklch(0.283 0.135 291.1) · oklch(28.3% 0.135 291.1)
OKLab
oklab(0.283 0.049 -0.126)
Lab (D50)
lab(14.22 31.30 -44.79)
LCH (D50)
lch(14.22 54.64 304.94)
Display P3
color(display-p3 0.1656 0.0694 0.3801)
Linear sRGB
color(srgb-linear 0.0273 0.0052 0.1301)

Gamut: sRGB and Display P3

#2E1065 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.159 and Display P3 reaches 0.163; this color uses 85% of the sRGB chroma available.

CSS snippets

.element {
  color: #2e1065;
  color: rgb(46 16 101);
  color: hsl(261 73% 23%);
  color: oklch(0.283 0.135 291.1);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.283 0.135 291.1);
}
/* arbitrary values */
class="text-[#2e1065] bg-[oklch(0.283_0.135_291.1)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.1656 0.0694 0.3801); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #2e1065 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #3C2377 · oklch(0.343 0.135 291.1) · ΔL +0.06
  • #210053 · oklch(0.223 0.135 291.1) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?