#512FB7#512FB7

#512FB7 is a dark, vivid violet. Relative luminance 0.072; OKLCH L 43.8% C 0.199 H 286.4°. Best body text is #FFFFFF at 8.61:1 contrast (WCAG AA passes).

Color values

HEX#512FB7
RGBrgb(81, 47, 183)
HSLhsl(255, 59%, 45%)
HSVhsv(255, 74%, 72%)
CMYKcmyk(55.7%, 74.3%, 0%, 28.2%)
CIE-LABlab(32.26, 49.30, -66.32)
CIE-LCHlch(32.26, 82.64, 306.63°)
OKLaboklab(43.79% 0.056 -0.1909)
OKLCHoklch(43.79% 0.199 286.4)
XYZxyz(12.9545, 7.2005, 45.4978)
Luminance0.0720 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512FB7 #95B72F
analogous
#2F51B7 #512FB7 #952FB7
triadic
#512FB7 #B7512F #2FB751
tetradic
#512FB7 #B72F51 #95B72F #2FB795
square
#512FB7 #B72F51 #95B72F #2FB795
split-complementary
#512FB7 #B7952F #51B72F
monochromatic
#261656 #3B2286 #512FB7 #7151D2 #9982DF

Accessibility & contrast

On white

8.61
#512FB7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#512FB7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512FB7
8.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512FB7#FFFFFF#000000##FFFFFF
##512FB71.008.612.448.61
#FFFFFF8.611.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FBB
Deuteranopia (green-blind)
#0048B4
Tritanopia (blue-blind)
#235571
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #512fb7;
/* rgb */ color: rgb(81, 47, 183);
/* oklch */ color: oklch(43.8% 0.199 286.4);
Tailwind
colors: {
  custom: {
    50: '#8d6bce',
    500: '#512fb7',
    950: '#000000',
  },
}
SCSS
$custom: #512fb7;
$custom-light: #8d6bce;
$custom-dark: #000000;
JSON
{
  "hex": "#512fb7",
  "rgb": {
    "r": 81,
    "g": 47,
    "b": 183
  },
  "hsl": {
    "h": 255,
    "s": 59.13,
    "l": 45.098
  },
  "oklch": {
    "l": 0.43792,
    "c": 0.19891,
    "h": 286.4
  },
  "luminance": 0.07201
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #512FB7

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

Preview Lab → · Contrast checker → · Palette generator →

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