#51237F#51237F

#51237F is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.3% C 0.147 H 302.6°. Best body text is #FFFFFF at 11.07:1 contrast (WCAG AA passes).

Color values

HEX#51237F
RGBrgb(81, 35, 127)
HSLhsl(270, 57%, 32%)
HSVhsv(270, 72%, 50%)
CMYKcmyk(36.2%, 72.4%, 0%, 50.2%)
CIE-LABlab(25.21, 39.88, -43.63)
CIE-LCHlch(25.21, 59.11, 312.43°)
OKLaboklab(37.29% 0.0795 -0.1242)
OKLCHoklch(37.29% 0.147 302.6)
XYZxyz(7.8242, 4.4837, 20.5278)
Luminance0.0448 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51237F #517F23
analogous
#23237F #51237F #7F237F
triadic
#51237F #7F5123 #237F51
tetradic
#51237F #7F2323 #517F23 #237F7F
square
#51237F #7F2323 #517F23 #237F7F
split-complementary
#51237F #7F7F23 #237F23
monochromatic
#14091F #32164F #51237F #7030AF #8E4ECE

Accessibility & contrast

On white

11.07
#51237F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#51237F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51237F
11.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51237F#FFFFFF#000000##FFFFFF
##51237F1.0011.071.9011.07
#FFFFFF11.071.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B82
Deuteranopia (green-blind)
#003B7D
Tritanopia (blue-blind)
#48394E
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #51237f;
/* rgb */ color: rgb(81, 35, 127);
/* oklch */ color: oklch(37.3% 0.147 302.6);
Tailwind
colors: {
  custom: {
    50: '#8662a5',
    500: '#51237f',
    950: '#000000',
  },
}
SCSS
$custom: #51237f;
$custom-light: #8662a5;
$custom-dark: #000000;
JSON
{
  "hex": "#51237f",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 127
  },
  "hsl": {
    "h": 270,
    "s": 56.79,
    "l": 31.765
  },
  "oklch": {
    "l": 0.37292,
    "c": 0.14746,
    "h": 302.6
  },
  "luminance": 0.04484
}

Semantic roles & 50–950 ramp

primary
#51237F
secondary
#7FB14C
accent
#E04894
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #51237F

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

Preview Lab → · Contrast checker → · Palette generator →

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