#5A2F8D#5A2F8D

#5A2F8D is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.1% C 0.149 H 301.1°. Best body text is #FFFFFF at 9.43:1 contrast (WCAG AA passes).

Color values

HEX#5A2F8D
RGBrgb(90, 47, 141)
HSLhsl(267, 50%, 37%)
HSVhsv(267, 67%, 55%)
CMYKcmyk(36.2%, 66.7%, 0%, 44.7%)
CIE-LABlab(29.74, 39.21, -44.98)
CIE-LCHlch(29.74, 59.67, 311.08°)
OKLaboklab(41.14% 0.077 -0.1279)
OKLCHoklch(41.14% 0.149 301.1)
XYZxyz(10.0395, 6.1297, 25.8484)
Luminance0.0613 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F8D #628D2F
analogous
#2F338D #5A2F8D #892F8D
triadic
#5A2F8D #8D5A2F #2F8D5A
tetradic
#5A2F8D #8D2F33 #628D2F #2F8D89
square
#5A2F8D #8D2F33 #628D2F #2F8D89
split-complementary
#5A2F8D #8D892F #338D2F
monochromatic
#1F1031 #3D205F #5A2F8D #773EBB #9769CD

Accessibility & contrast

On white

9.43
#5A2F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#5A2F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F8D
9.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F8D#FFFFFF#000000##FFFFFF
##5A2F8D1.009.432.239.43
#FFFFFF9.431.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004690
Deuteranopia (green-blind)
#04468B
Tritanopia (blue-blind)
#4F445A
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5a2f8d;
/* rgb */ color: rgb(90, 47, 141);
/* oklch */ color: oklch(41.1% 0.149 301.1);
Tailwind
colors: {
  custom: {
    50: '#8d6aaf',
    500: '#5a2f8d',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f8d;
$custom-light: #8d6aaf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f8d",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 141
  },
  "hsl": {
    "h": 267.447,
    "s": 50,
    "l": 36.863
  },
  "oklch": {
    "l": 0.41135,
    "c": 0.14929,
    "h": 301.1
  },
  "luminance": 0.0613
}

Semantic roles & 50–950 ramp

primary
#5A2F8D
secondary
#8FB464
accent
#DA4E9A
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0D0710
muted
#7D7A7F

Preview Lab

Preview with #5A2F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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