#512298#512298

#512298 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.4% C 0.177 H 295.0°. Best body text is #FFFFFF at 10.33:1 contrast (WCAG AA passes).

Color values

HEX#512298
RGBrgb(81, 34, 152)
HSLhsl(264, 63%, 36%)
HSVhsv(264, 78%, 60%)
CMYKcmyk(46.7%, 77.6%, 0%, 40.4%)
CIE-LABlab(27.19, 46.96, -55.95)
CIE-LCHlch(27.19, 73.05, 310.00°)
OKLaboklab(39.35% 0.0747 -0.1604)
OKLCHoklch(39.35% 0.177 295)
XYZxyz(9.6313, 5.1601, 30.1882)
Luminance0.0516 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512298 #699822
analogous
#222E98 #512298 #8C2298
triadic
#512298 #985122 #229851
tetradic
#512298 #98222E #699822 #22988C
square
#512298 #98222E #699822 #22988C
split-complementary
#512298 #988C22 #2E9822
monochromatic
#1C0C34 #361766 #512298 #6C2DCA #8D5ADA

Accessibility & contrast

On white

10.33
#512298 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512298
10.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512298#FFFFFF#000000##FFFFFF
##5122981.0010.332.0310.33
#FFFFFF10.331.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.331.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: #512298;
/* rgb */ color: rgb(81, 34, 152);
/* oklch */ color: oklch(39.4% 0.177 295.0);
Tailwind
colors: {
  custom: {
    50: '#8963b7',
    500: '#512298',
    950: '#000000',
  },
}
SCSS
$custom: #512298;
$custom-light: #8963b7;
$custom-dark: #000000;
JSON
{
  "hex": "#512298",
  "rgb": {
    "r": 81,
    "g": 34,
    "b": 152
  },
  "hsl": {
    "h": 263.898,
    "s": 63.441,
    "l": 36.471
  },
  "oklch": {
    "l": 0.39353,
    "c": 0.17694,
    "h": 295
  },
  "luminance": 0.0516
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512298

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

Preview Lab → · Contrast checker → · Palette generator →

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