#512198#512198

#512198 is a dark, vivid violet. Relative luminance 0.051; OKLCH L 39.2% C 0.178 H 295.1°. Best body text is #FFFFFF at 10.39:1 contrast (WCAG AA passes).

Color values

HEX#512198
RGBrgb(81, 33, 152)
HSLhsl(264, 64%, 36%)
HSVhsv(264, 78%, 60%)
CMYKcmyk(46.7%, 78.3%, 0%, 40.4%)
CIE-LABlab(27.03, 47.41, -56.21)
CIE-LCHlch(27.03, 73.54, 310.14°)
OKLaboklab(39.24% 0.0756 -0.1611)
OKLCHoklch(39.24% 0.178 295.1)
XYZxyz(9.6032, 5.1038, 30.1788)
Luminance0.0510 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512198 #689821
analogous
#212D98 #512198 #8D2198
triadic
#512198 #985121 #219851
tetradic
#512198 #98212D #689821 #21988D
square
#512198 #98212D #689821 #21988D
split-complementary
#512198 #988D21 #2D9821
monochromatic
#1B0B33 #361666 #512198 #6C2CCA #8D59DB

Accessibility & contrast

On white

10.39
#512198 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#512198 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512198
10.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512198#FFFFFF#000000##FFFFFF
##5121981.0010.392.0210.39
#FFFFFF10.391.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419B
Deuteranopia (green-blind)
#003E96
Tritanopia (blue-blind)
#3D425C
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #512198;
/* rgb */ color: rgb(81, 33, 152);
/* oklch */ color: oklch(39.2% 0.178 295.1);
Tailwind
colors: {
  custom: {
    50: '#8962b7',
    500: '#512198',
    950: '#000000',
  },
}
SCSS
$custom: #512198;
$custom-light: #8962b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512198",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 152
  },
  "hsl": {
    "h": 264.202,
    "s": 64.324,
    "l": 36.275
  },
  "oklch": {
    "l": 0.39243,
    "c": 0.17797,
    "h": 295.1
  },
  "luminance": 0.05104
}

Semantic roles & 50–950 ramp

primary
#512198
secondary
#95BF56
accent
#E740A4
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0511
muted
#7D7A80

Preview Lab

Preview with #512198

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

Preview Lab → · Contrast checker → · Palette generator →

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