#5123A6#5123A6

#5123A6 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.8% C 0.191 H 291.4°. Best body text is #FFFFFF at 9.81:1 contrast (WCAG AA passes).

Color values

HEX#5123A6
RGBrgb(81, 35, 166)
HSLhsl(261, 65%, 39%)
HSVhsv(261, 79%, 65%)
CMYKcmyk(51.2%, 78.9%, 0%, 34.9%)
CIE-LABlab(28.65, 50.27, -62.07)
CIE-LCHlch(28.65, 79.87, 309.00°)
OKLaboklab(40.78% 0.0698 -0.1783)
OKLCHoklch(40.78% 0.191 291.4)
XYZxyz(10.8753, 5.7041, 36.5970)
Luminance0.0570 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5123A6 #78A623
analogous
#2336A6 #5123A6 #9323A6
triadic
#5123A6 #A65123 #23A651
tetradic
#5123A6 #A62336 #78A623 #23A693
square
#5123A6 #A62336 #78A623 #23A693
split-complementary
#5123A6 #A69323 #36A623
monochromatic
#200E41 #381873 #5123A6 #6B32D4 #9065DF

Accessibility & contrast

On white

9.81
#5123A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#5123A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5123A6
9.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5123A6#FFFFFF#000000##FFFFFF
##5123A61.009.812.149.81
#FFFFFF9.811.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046AA
Deuteranopia (green-blind)
#0041A4
Tritanopia (blue-blind)
#344864
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5123a6;
/* rgb */ color: rgb(81, 35, 166);
/* oklch */ color: oklch(40.8% 0.191 291.4);
Tailwind
colors: {
  custom: {
    50: '#8b64c2',
    500: '#5123a6',
    950: '#000000',
  },
}
SCSS
$custom: #5123a6;
$custom-light: #8b64c2;
$custom-dark: #000000;
JSON
{
  "hex": "#5123a6",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 166
  },
  "hsl": {
    "h": 261.069,
    "s": 65.174,
    "l": 39.412
  },
  "oklch": {
    "l": 0.40778,
    "c": 0.19149,
    "h": 291.4
  },
  "luminance": 0.05705
}

Semantic roles & 50–950 ramp

primary
#5123A6
secondary
#A1C461
accent
#E840AD
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5123A6

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#5123A6 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva