#512E98#512E98

#512E98 is a dark, vivid violet. Relative luminance 0.060; OKLCH L 40.9% C 0.163 H 292.9°. Best body text is #FFFFFF at 9.57:1 contrast (WCAG AA passes).

Color values

HEX#512E98
RGBrgb(81, 46, 152)
HSLhsl(260, 54%, 39%)
HSVhsv(260, 70%, 60%)
CMYKcmyk(46.7%, 69.7%, 0%, 40.4%)
CIE-LABlab(29.34, 40.91, -52.44)
CIE-LCHlch(29.34, 66.51, 307.96°)
OKLaboklab(40.88% 0.0635 -0.1501)
OKLCHoklch(40.88% 0.163 292.9)
XYZxyz(10.0363, 5.9700, 30.3232)
Luminance0.0597 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512E98 #75982E
analogous
#2E4098 #512E98 #862E98
triadic
#512E98 #98512E #2E9851
tetradic
#512E98 #982E40 #75982E #2E9886
square
#512E98 #982E40 #75982E #2E9886
split-complementary
#512E98 #98862E #40982E
monochromatic
#1F123A #382069 #512E98 #6B3EC5 #8F6DD3

Accessibility & contrast

On white

9.57
#512E98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#512E98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512E98
9.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512E98#FFFFFF#000000##FFFFFF
##512E981.009.572.199.57
#FFFFFF9.571.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469B
Deuteranopia (green-blind)
#004396
Tritanopia (blue-blind)
#3C485F
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #512e98;
/* rgb */ color: rgb(81, 46, 152);
/* oklch */ color: oklch(40.9% 0.163 292.9);
Tailwind
colors: {
  custom: {
    50: '#8869b7',
    500: '#512e98',
    950: '#000000',
  },
}
SCSS
$custom: #512e98;
$custom-light: #8869b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512e98",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 152
  },
  "hsl": {
    "h": 259.811,
    "s": 53.535,
    "l": 38.824
  },
  "oklch": {
    "l": 0.40876,
    "c": 0.16301,
    "h": 292.9
  },
  "luminance": 0.0597
}

Semantic roles & 50–950 ramp

primary
#512E98
secondary
#9FBA68
accent
#DD4BAD
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512E98

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

Preview Lab → · Contrast checker → · Palette generator →

#512E98 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva