#51257B#51257B

#51257B is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.2% C 0.140 H 303.7°. Best body text is #FFFFFF at 11.05:1 contrast (WCAG AA passes).

Color values

HEX#51257B
RGBrgb(81, 37, 123)
HSLhsl(271, 54%, 31%)
HSVhsv(271, 70%, 48%)
CMYKcmyk(34.1%, 69.9%, 0%, 51.8%)
CIE-LABlab(25.27, 37.81, -41.01)
CIE-LCHlch(25.27, 55.77, 312.67°)
OKLaboklab(37.24% 0.0778 -0.1165)
OKLCHoklch(37.24% 0.14 303.7)
XYZxyz(7.6292, 4.5025, 19.2022)
Luminance0.0450 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51257B #4F7B25
analogous
#26257B #51257B #7B257A
triadic
#51257B #7B5125 #257B51
tetradic
#51257B #7B2625 #4F7B25 #257A7B
square
#51257B #7B2625 #4F7B25 #257A7B
split-complementary
#51257B #7A7B25 #257B26
monochromatic
#13091D #32174C #51257B #7033AA #8F50CA

Accessibility & contrast

On white

11.05
#51257B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#51257B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51257B
11.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51257B#FFFFFF#000000##FFFFFF
##51257B1.0011.051.9011.05
#FFFFFF11.051.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B7E
Deuteranopia (green-blind)
#033C79
Tritanopia (blue-blind)
#49384D
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #51257b;
/* rgb */ color: rgb(81, 37, 123);
/* oklch */ color: oklch(37.2% 0.140 303.7);
Tailwind
colors: {
  custom: {
    50: '#8663a2',
    500: '#51257b',
    950: '#000000',
  },
}
SCSS
$custom: #51257b;
$custom-light: #8663a2;
$custom-dark: #000000;
JSON
{
  "hex": "#51257b",
  "rgb": {
    "r": 81,
    "g": 37,
    "b": 123
  },
  "hsl": {
    "h": 270.698,
    "s": 53.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.37235,
    "c": 0.1401,
    "h": 303.7
  },
  "luminance": 0.04503
}

Semantic roles & 50–950 ramp

primary
#51257B
secondary
#7DAD4F
accent
#DD4B92
background
#F8F6FA
surface
#F0EBF3
border
#CBC6CD
text
#0B050F
muted
#7C7A7F

Preview Lab

Preview with #51257B

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

Preview Lab → · Contrast checker → · Palette generator →

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