#51237D#51237D

#51237D is a dark, vivid violet. Relative luminance 0.044; OKLCH L 37.1% C 0.145 H 303.4°. Best body text is #FFFFFF at 11.13:1 contrast (WCAG AA passes).

Color values

HEX#51237D
RGBrgb(81, 35, 125)
HSLhsl(271, 56%, 31%)
HSVhsv(271, 72%, 49%)
CMYKcmyk(35.2%, 72%, 0%, 51%)
CIE-LABlab(25.05, 39.36, -42.62)
CIE-LCHlch(25.05, 58.02, 312.72°)
OKLaboklab(37.13% 0.0798 -0.1212)
OKLCHoklch(37.13% 0.145 303.4)
XYZxyz(7.6952, 4.4321, 19.8481)
Luminance0.0443 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51237D #4F7D23
analogous
#24237D #51237D #7D237C
triadic
#51237D #7D5123 #237D51
tetradic
#51237D #7D2423 #4F7D23 #237C7D
square
#51237D #7D2423 #4F7D23 #237C7D
split-complementary
#51237D #7C7D23 #237D24
monochromatic
#13081D #32164D #51237D #7030AD #8F4DCD

Accessibility & contrast

On white

11.13
#51237D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.89
#51237D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51237D
11.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51237D#FFFFFF#000000##FFFFFF
##51237D1.0011.131.8911.13
#FFFFFF11.131.0021.001.00
#0000001.8921.001.0021.00
##FFFFFF11.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A80
Deuteranopia (green-blind)
#003B7B
Tritanopia (blue-blind)
#48384D
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #51237d;
/* rgb */ color: rgb(81, 35, 125);
/* oklch */ color: oklch(37.1% 0.145 303.4);
Tailwind
colors: {
  custom: {
    50: '#8662a3',
    500: '#51237d',
    950: '#000000',
  },
}
SCSS
$custom: #51237d;
$custom-light: #8662a3;
$custom-dark: #000000;
JSON
{
  "hex": "#51237d",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 125
  },
  "hsl": {
    "h": 270.667,
    "s": 56.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.37129,
    "c": 0.14516,
    "h": 303.4
  },
  "luminance": 0.04432
}

Semantic roles & 50–950 ramp

primary
#51237D
secondary
#7DAF4C
accent
#E04892
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C050F
muted
#7D797F

Preview Lab

Preview with #51237D

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

Preview Lab → · Contrast checker → · Palette generator →

#51237D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva