#51238B#51238B

#51238B is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.3% C 0.161 H 298.6°. Best body text is #FFFFFF at 10.70:1 contrast (WCAG AA passes).

Color values

HEX#51238B
RGBrgb(81, 35, 139)
HSLhsl(267, 60%, 34%)
HSVhsv(267, 75%, 55%)
CMYKcmyk(41.7%, 74.8%, 0%, 45.5%)
CIE-LABlab(26.20, 43.03, -49.53)
CIE-LCHlch(26.20, 65.61, 310.98°)
OKLaboklab(38.31% 0.0771 -0.1415)
OKLCHoklch(38.31% 0.161 298.6)
XYZxyz(8.6534, 4.8153, 24.8946)
Luminance0.0481 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51238B #5D8B23
analogous
#23298B #51238B #85238B
triadic
#51238B #8B5123 #238B51
tetradic
#51238B #8B2329 #5D8B23 #238B85
square
#51238B #8B2329 #5D8B23 #238B85
split-complementary
#51238B #8B8523 #298B23
monochromatic
#180A29 #35175A #51238B #6D2FBC #8D54D4

Accessibility & contrast

On white

10.70
#51238B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#51238B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51238B
10.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51238B#FFFFFF#000000##FFFFFF
##51238B1.0010.701.9610.70
#FFFFFF10.701.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#433D55
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51238b;
/* rgb */ color: rgb(81, 35, 139);
/* oklch */ color: oklch(38.3% 0.161 298.6);
Tailwind
colors: {
  custom: {
    50: '#8862ae',
    500: '#51238b',
    950: '#000000',
  },
}
SCSS
$custom: #51238b;
$custom-light: #8862ae;
$custom-dark: #000000;
JSON
{
  "hex": "#51238b",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 139
  },
  "hsl": {
    "h": 266.538,
    "s": 59.77,
    "l": 34.118
  },
  "oklch": {
    "l": 0.38306,
    "c": 0.16119,
    "h": 298.6
  },
  "luminance": 0.04815
}

Semantic roles & 50–950 ramp

primary
#51238B
secondary
#8BB852
accent
#E3459D
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51238B

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

Preview Lab → · Contrast checker → · Palette generator →

#51238B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva