#512174#512174

#512174 is a dark, vivid violet. Relative luminance 0.041; OKLCH L 36.2% C 0.138 H 307.3°. Best body text is #FFFFFF at 11.54:1 contrast (WCAG AA passes).

Color values

HEX#512174
RGBrgb(81, 33, 116)
HSLhsl(275, 56%, 29%)
HSVhsv(275, 72%, 45%)
CMYKcmyk(30.2%, 71.6%, 0%, 54.5%)
CIE-LABlab(23.99, 38.08, -38.61)
CIE-LCHlch(23.99, 54.23, 314.61°)
OKLaboklab(36.15% 0.0834 -0.1094)
OKLCHoklch(36.15% 0.138 307.3)
XYZxyz(7.0889, 4.0981, 16.9372)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512174 #447421
analogous
#282174 #512174 #74216E
triadic
#512174 #745121 #217451
tetradic
#512174 #742821 #447421 #216E74
square
#512174 #742821 #447421 #216E74
split-complementary
#512174 #6E7421 #217428
monochromatic
#110718 #301344 #512174 #722FA4 #9245CA

Accessibility & contrast

On white

11.54
#512174 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#512174 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512174
11.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512174#FFFFFF#000000##FFFFFF
##5121741.0011.541.8211.54
#FFFFFF11.541.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003776
Deuteranopia (green-blind)
#0B3972
Tritanopia (blue-blind)
#4B3348
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #512174;
/* rgb */ color: rgb(81, 33, 116);
/* oklch */ color: oklch(36.2% 0.138 307.3);
Tailwind
colors: {
  custom: {
    50: '#85609d',
    500: '#512174',
    950: '#000000',
  },
}
SCSS
$custom: #512174;
$custom-light: #85609d;
$custom-dark: #000000;
JSON
{
  "hex": "#512174",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 116
  },
  "hsl": {
    "h": 274.699,
    "s": 55.705,
    "l": 29.216
  },
  "oklch": {
    "l": 0.36153,
    "c": 0.13761,
    "h": 307.3
  },
  "luminance": 0.04098
}

Semantic roles & 50–950 ramp

primary
#512174
secondary
#71A749
accent
#DF4988
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0B050E
muted
#7C797E

Preview Lab

Preview with #512174

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

Preview Lab → · Contrast checker → · Palette generator →

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