HEX to RGB: #2E1065

Also known as: Tailwind v3 violet-950

Result

#2E1065 → rgb(46 16 101)

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. HEX → pairs

    #2E1065 → 2E | 10 | 65
  2. 2. base 16 → base 10

    R = 2E₁₆ = 2×16 + 14 = 46
    G = 10₁₆ = 1×16 + 0 = 16
    B = 65₁₆ = 6×16 + 5 = 101
  3. 3. RGB

    rgb(46 16 101)

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?