#5A238B#5A238B

#5A238B is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.4% C 0.163 H 303.8°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#5A238B
RGBrgb(90, 35, 139)
HSLhsl(272, 60%, 34%)
HSVhsv(272, 75%, 55%)
CMYKcmyk(35.3%, 74.8%, 0%, 45.5%)
CIE-LABlab(27.41, 44.75, -47.52)
CIE-LCHlch(27.41, 65.27, 313.28°)
OKLaboklab(39.42% 0.0906 -0.1353)
OKLCHoklch(39.42% 0.163 303.8)
XYZxyz(9.4766, 5.2398, 24.9332)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A238B #548B23
analogous
#26238B #5A238B #8B2388
triadic
#5A238B #8B5A23 #238B5A
tetradic
#5A238B #8B2623 #548B23 #23888B
square
#5A238B #8B2623 #548B23 #23888B
split-complementary
#5A238B #888B23 #238B26
monochromatic
#1B0A29 #3A175A #5A238B #7A2FBC #9854D4

Accessibility & contrast

On white

10.25
#5A238B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#5A238B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A238B
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A238B#FFFFFF#000000##FFFFFF
##5A238B1.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408E
Deuteranopia (green-blind)
#004189
Tritanopia (blue-blind)
#503C55
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a238b;
/* rgb */ color: rgb(90, 35, 139);
/* oklch */ color: oklch(39.4% 0.163 303.8);
Tailwind
colors: {
  custom: {
    50: '#8d63ae',
    500: '#5a238b',
    950: '#000000',
  },
}
SCSS
$custom: #5a238b;
$custom-light: #8d63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a238b",
  "rgb": {
    "r": 90,
    "g": 35,
    "b": 139
  },
  "hsl": {
    "h": 271.731,
    "s": 59.77,
    "l": 34.118
  },
  "oklch": {
    "l": 0.39422,
    "c": 0.16283,
    "h": 303.8
  },
  "luminance": 0.0524
}

Semantic roles & 50–950 ramp

primary
#5A238B
secondary
#82B852
accent
#E3458F
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5A238B

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

Preview Lab → · Contrast checker → · Palette generator →

#5A238B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva