#5A238C#5A238C

#5A238C is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.5% C 0.164 H 303.5°. Best body text is #FFFFFF at 10.22:1 contrast (WCAG AA passes).

Color values

HEX#5A238C
RGBrgb(90, 35, 140)
HSLhsl(271, 60%, 34%)
HSVhsv(271, 75%, 55%)
CMYKcmyk(35.7%, 75%, 0%, 45.1%)
CIE-LABlab(27.49, 45.00, -48.01)
CIE-LCHlch(27.49, 65.80, 313.15°)
OKLaboklab(39.5% 0.0904 -0.1367)
OKLCHoklch(39.5% 0.164 303.5)
XYZxyz(9.5500, 5.2692, 25.3198)
Luminance0.0527 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A238C #558C23
analogous
#26238C #5A238C #8C238A
triadic
#5A238C #8C5A23 #238C5A
tetradic
#5A238C #8C2623 #558C23 #238A8C
square
#5A238C #8C2623 #558C23 #238A8C
split-complementary
#5A238C #8A8C23 #238C26
monochromatic
#1B0B2A #3B175B #5A238C #792FBD #9855D4

Accessibility & contrast

On white

10.22
#5A238C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A238C
10.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A238C#FFFFFF#000000##FFFFFF
##5A238C1.0010.222.0510.22
#FFFFFF10.221.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00408F
Deuteranopia (green-blind)
#00418A
Tritanopia (blue-blind)
#503D55
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a238c;
/* rgb */ color: rgb(90, 35, 140);
/* oklch */ color: oklch(39.5% 0.164 303.5);
Tailwind
colors: {
  custom: {
    50: '#8e63ae',
    500: '#5a238c',
    950: '#000000',
  },
}
SCSS
$custom: #5a238c;
$custom-light: #8e63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a238c",
  "rgb": {
    "r": 90,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 271.429,
    "s": 60,
    "l": 34.314
  },
  "oklch": {
    "l": 0.39504,
    "c": 0.16391,
    "h": 303.5
  },
  "luminance": 0.05269
}

Semantic roles & 50–950 ramp

primary
#5A238C
secondary
#83B852
accent
#E34590
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5A238C

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

Preview Lab → · Contrast checker → · Palette generator →

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