#512297#512297

#512297 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 39.3% C 0.176 H 295.2°. Best body text is #FFFFFF at 10.37:1 contrast (WCAG AA passes).

Color values

HEX#512297
RGBrgb(81, 34, 151)
HSLhsl(264, 63%, 36%)
HSVhsv(264, 77%, 59%)
CMYKcmyk(46.4%, 77.5%, 0%, 40.8%)
CIE-LABlab(27.09, 46.69, -55.49)
CIE-LCHlch(27.09, 72.52, 310.08°)
OKLaboklab(39.26% 0.075 -0.159)
OKLCHoklch(39.26% 0.176 295.2)
XYZxyz(9.5498, 5.1275, 29.7587)
Luminance0.0513 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512297 #689722
analogous
#222D97 #512297 #8C2297
triadic
#512297 #975122 #229751
tetradic
#512297 #97222D #689722 #22978C
square
#512297 #97222D #689722 #22978C
split-complementary
#512297 #978C22 #2D9722
monochromatic
#1B0C33 #361765 #512297 #6C2DC9 #8D5ADA

Accessibility & contrast

On white

10.37
#512297 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#512297 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512297
10.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512297#FFFFFF#000000##FFFFFF
##5122971.0010.372.0310.37
#FFFFFF10.371.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419A
Deuteranopia (green-blind)
#003E95
Tritanopia (blue-blind)
#3D425B
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512297;
/* rgb */ color: rgb(81, 34, 151);
/* oklch */ color: oklch(39.3% 0.176 295.2);
Tailwind
colors: {
  custom: {
    50: '#8963b7',
    500: '#512297',
    950: '#000000',
  },
}
SCSS
$custom: #512297;
$custom-light: #8963b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512297",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 151
  },
  "hsl": {
    "h": 264.103,
    "s": 63.243,
    "l": 36.275
  },
  "oklch": {
    "l": 0.39261,
    "c": 0.17583,
    "h": 295.2
  },
  "luminance": 0.05128
}

Semantic roles & 50–950 ramp

primary
#512297
secondary
#95BE57
accent
#E642A4
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #512297

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

Preview Lab → · Contrast checker → · Palette generator →

#512297 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva