#8A51EC

A color in the Violet family

#8a51ec is a color in the Violet family: RGB(138, 81, 236), HSL(262°, 80%, 62%), CMYK(42%, 66%, 0%, 7%). Closest named color: mediumslateblue. Contrast is 4.7:1 on white and 4.47:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#8a51ec
RGBrgb(138 81 236)
RGB (legacy)rgb(138, 81, 236)
RGB %rgb(54% 32% 93%)
HSLhsl(262 80% 62%)
HSV / HSBhsv(262, 66%, 93%)
HWBhwb(262 32% 7%)
CMYKcmyk(42%, 66%, 0%, 7%)
CIELAB (D50)lab(47.8 49.06 -70.89)
LCHlch(47.8 86.21 304.68)
OKLaboklab(0.5821 0.0956 -0.1994)
OKLCHoklch(0.5821 0.2211 295.6)
Decimal9064940

Properties

Color ToneViolet
Closest named colormediumslateblue ΔE 5.1
Closest web-safe color#9966ff
Hue262°
Saturation (HSL / HSV)80% / 66%
Lightness (HSL)62%
Brightness or Value (HSV)93%
Luminance (Rec.601 / Rec.709)45% / 41%
Relative luminance (WCAG)0.1734
Red / Green / Blue138 / 81 / 236

WCAG 2.2 Contrast Ratio

On White (#ffffff)
4.70:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Fail
On Black (#000000)
4.47:1
AA Normal (4.5:1) · FailAA Large (3:1) · PassAAA Normal (7:1) · Fail
Aa Bb 123

APCA Contrast Lc (reference) — As text on white / black: Lc 72 / -29.7 · As background with white / black text: Lc -77.5 / 32.1

Lightness Scale (OKLCH 50–950)

Eleven steps that change only perceived lightness while keeping hue and chroma — ready to use as design-system color tokens.

Tints (mixed with white)

Shades (mixed with black)

Color Harmonies

Color Vision Deficiency Simulation

Estimated appearance of this color for people with color vision deficiencies (Machado 2009).

Similar Named Colors

Use in CSS

:root {
  --color-brand: #8a51ec;
  --color-brand-oklch: oklch(58.21% 0.2211 295.6);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(138 81 236 / 50%); }
/* Tailwind CSS */
<div class="bg-[#8a51ec] text-[#8a51ec] border-[#8a51ec]">