#512FB8#512FB8

#512FB8 is a dark, highly saturated violet. Relative luminance 0.072; OKLCH L 43.9% C 0.200 H 286.2°. Best body text is #FFFFFF at 8.58:1 contrast (WCAG AA passes).

Color values

HEX#512FB8
RGBrgb(81, 47, 184)
HSLhsl(255, 59%, 45%)
HSVhsv(255, 74%, 72%)
CMYKcmyk(56%, 74.5%, 0%, 27.8%)
CIE-LABlab(32.35, 49.59, -66.76)
CIE-LCHlch(32.35, 83.16, 306.61°)
OKLaboklab(43.89% 0.0558 -0.1921)
OKLCHoklch(43.89% 0.2 286.2)
XYZxyz(13.0590, 7.2423, 46.0479)
Luminance0.0724 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FB8 #96B82F
analogous
#2F51B8 #512FB8 #962FB8
triadic
#512FB8 #B8512F #2FB851
tetradic
#512FB8 #B82F51 #96B82F #2FB896
square
#512FB8 #B82F51 #96B82F #2FB896
split-complementary
#512FB8 #B8962F #51B82F
monochromatic
#261657 #3C2387 #512FB8 #7252D3 #9982DF

Accessibility & contrast

On white

8.58
#512FB8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.45
#512FB8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FB8
8.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FB8#FFFFFF#000000##FFFFFF
##512FB81.008.582.458.58
#FFFFFF8.581.0021.001.00
#0000002.4521.001.0021.00
##FFFFFF8.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050BC
Deuteranopia (green-blind)
#0048B5
Tritanopia (blue-blind)
#215571
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #512fb8;
/* rgb */ color: rgb(81, 47, 184);
/* oklch */ color: oklch(43.9% 0.200 286.2);
Tailwind
colors: {
  custom: {
    50: '#8d6bce',
    500: '#512fb8',
    950: '#000000',
  },
}
SCSS
$custom: #512fb8;
$custom-light: #8d6bce;
$custom-dark: #000000;
JSON
{
  "hex": "#512fb8",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 184
  },
  "hsl": {
    "h": 254.891,
    "s": 59.307,
    "l": 45.294
  },
  "oklch": {
    "l": 0.43886,
    "c": 0.20007,
    "h": 286.2
  },
  "luminance": 0.07243
}

Semantic roles & 50–950 ramp

primary
#512FB8
secondary
#B5C87B
accent
#E245BB
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512FB8

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

Preview Lab → · Contrast checker → · Palette generator →

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