#5A338D#5A338D

#5A338D is a dark, vivid violet. Relative luminance 0.065; OKLCH L 41.7% C 0.143 H 300.2°. Best body text is #FFFFFF at 9.16:1 contrast (WCAG AA passes).

Color values

HEX#5A338D
RGBrgb(90, 51, 141)
HSLhsl(266, 47%, 38%)
HSVhsv(266, 64%, 55%)
CMYKcmyk(36.2%, 63.8%, 0%, 44.7%)
CIE-LABlab(30.55, 36.99, -43.66)
CIE-LCHlch(30.55, 57.22, 310.27°)
OKLaboklab(41.73% 0.0721 -0.124)
OKLCHoklch(41.73% 0.143 300.2)
XYZxyz(10.2068, 6.4643, 25.9041)
Luminance0.0646 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A338D #668D33
analogous
#33398D #5A338D #87338D
triadic
#5A338D #8D5A33 #338D5A
tetradic
#5A338D #8D3339 #668D33 #338D87
square
#5A338D #8D3339 #668D33 #338D87
split-complementary
#5A338D #8D8733 #398D33
monochromatic
#211233 #3D2360 #5A338D #7743BA #976FCB

Accessibility & contrast

On white

9.16
#5A338D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.29
#5A338D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A338D
9.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A338D#FFFFFF#000000##FFFFFF
##5A338D1.009.162.299.16
#FFFFFF9.161.0021.001.00
#0000002.2921.001.0021.00
##FFFFFF9.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004890
Deuteranopia (green-blind)
#10478B
Tritanopia (blue-blind)
#4F465B
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #5a338d;
/* rgb */ color: rgb(90, 51, 141);
/* oklch */ color: oklch(41.7% 0.143 300.2);
Tailwind
colors: {
  custom: {
    50: '#8d6daf',
    500: '#5a338d',
    950: '#000000',
  },
}
SCSS
$custom: #5a338d;
$custom-light: #8d6daf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a338d",
  "rgb": {
    "r": 90,
    "g": 51,
    "b": 141
  },
  "hsl": {
    "h": 266,
    "s": 46.875,
    "l": 37.647
  },
  "oklch": {
    "l": 0.41726,
    "c": 0.14348,
    "h": 300.2
  },
  "luminance": 0.06464
}

Semantic roles & 50–950 ramp

primary
#5A338D
secondary
#93B369
accent
#D7519D
background
#F8F6FA
surface
#F0ECF4
border
#CBC7CE
text
#0C0710
muted
#7D7A7F

Preview Lab

Preview with #5A338D

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

Preview Lab → · Contrast checker → · Palette generator →

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