#5A238E#5A238E

#5A238E is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.7% C 0.166 H 302.8°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#5A238E
RGBrgb(90, 35, 142)
HSLhsl(271, 60%, 35%)
HSVhsv(271, 75%, 56%)
CMYKcmyk(36.6%, 75.4%, 0%, 44.3%)
CIE-LABlab(27.65, 45.50, -48.98)
CIE-LCHlch(27.65, 66.85, 312.89°)
OKLaboklab(39.67% 0.09 -0.1396)
OKLCHoklch(39.67% 0.166 302.8)
XYZxyz(9.6988, 5.3287, 26.1035)
Luminance0.0533 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A238E #578E23
analogous
#24238E #5A238E #8E238D
triadic
#5A238E #8E5A23 #238E5A
tetradic
#5A238E #8E2423 #578E23 #238D8E
square
#5A238E #8E2423 #578E23 #238D8E
split-complementary
#5A238E #8D8E23 #238E24
monochromatic
#1C0B2C #3B175D #5A238E #792FBF #9756D5

Accessibility & contrast

On white

10.17
#5A238E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#5A238E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A238E
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A238E#FFFFFF#000000##FFFFFF
##5A238E1.0010.172.0710.17
#FFFFFF10.171.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004091
Deuteranopia (green-blind)
#00418C
Tritanopia (blue-blind)
#4F3E57
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a238e;
/* rgb */ color: rgb(90, 35, 142);
/* oklch */ color: oklch(39.7% 0.166 302.8);
Tailwind
colors: {
  custom: {
    50: '#8e64b0',
    500: '#5a238e',
    950: '#000000',
  },
}
SCSS
$custom: #5a238e;
$custom-light: #8e64b0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a238e",
  "rgb": {
    "r": 90,
    "g": 35,
    "b": 142
  },
  "hsl": {
    "h": 270.841,
    "s": 60.452,
    "l": 34.706
  },
  "oklch": {
    "l": 0.3967,
    "c": 0.16608,
    "h": 302.8
  },
  "luminance": 0.05329
}

Semantic roles & 50–950 ramp

primary
#5A238E
secondary
#85B953
accent
#E44492
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5A238E

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

Preview Lab → · Contrast checker → · Palette generator →

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