#51238C#51238C

#51238C is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.4% C 0.162 H 298.3°. Best body text is #FFFFFF at 10.67:1 contrast (WCAG AA passes).

Color values

HEX#51238C
RGBrgb(81, 35, 140)
HSLhsl(266, 60%, 34%)
HSVhsv(266, 75%, 55%)
CMYKcmyk(42.1%, 75%, 0%, 45.1%)
CIE-LABlab(26.29, 43.29, -50.02)
CIE-LCHlch(26.29, 66.15, 310.88°)
OKLaboklab(38.39% 0.0769 -0.143)
OKLCHoklch(38.39% 0.162 298.3)
XYZxyz(8.7268, 4.8447, 25.2812)
Luminance0.0485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#51238C #5E8C23
analogous
#23298C #51238C #86238C
triadic
#51238C #8C5123 #238C51
tetradic
#51238C #8C2329 #5E8C23 #238C86
square
#51238C #8C2329 #5E8C23 #238C86
split-complementary
#51238C #8C8623 #298C23
monochromatic
#180B2A #35175B #51238C #6D2FBD #8D55D4

Accessibility & contrast

On white

10.67
#51238C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#51238C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #51238C
10.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##51238C#FFFFFF#000000##FFFFFF
##51238C1.0010.671.9710.67
#FFFFFF10.671.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#423E55
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #51238c;
/* rgb */ color: rgb(81, 35, 140);
/* oklch */ color: oklch(38.4% 0.162 298.3);
Tailwind
colors: {
  custom: {
    50: '#8863ae',
    500: '#51238c',
    950: '#000000',
  },
}
SCSS
$custom: #51238c;
$custom-light: #8863ae;
$custom-dark: #000000;
JSON
{
  "hex": "#51238c",
  "rgb": {
    "r": 81,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 266.286,
    "s": 60,
    "l": 34.314
  },
  "oklch": {
    "l": 0.38393,
    "c": 0.16233,
    "h": 298.3
  },
  "luminance": 0.04845
}

Semantic roles & 50–950 ramp

primary
#51238C
secondary
#8CB852
accent
#E3459E
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0510
muted
#7D7A7F

Preview Lab

Preview with #51238C

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

Preview Lab → · Contrast checker → · Palette generator →

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