#5A2F78#5A2F78

#5A2F78 is a dark, vivid violet. Relative luminance 0.056; OKLCH L 39.6% C 0.124 H 309.0°. Best body text is #FFFFFF at 9.94:1 contrast (WCAG AA passes).

Color values

HEX#5A2F78
RGBrgb(90, 47, 120)
HSLhsl(275, 44%, 33%)
HSVhsv(275, 61%, 47%)
CMYKcmyk(25%, 60.8%, 0%, 52.9%)
CIE-LABlab(28.28, 33.80, -34.20)
CIE-LCHlch(28.28, 48.08, 314.66°)
OKLaboklab(39.61% 0.078 -0.0962)
OKLCHoklch(39.61% 0.124 309)
XYZxyz(8.6225, 5.5629, 18.3852)
Luminance0.0556 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F78 #4D782F
analogous
#352F78 #5A2F78 #782F72
triadic
#5A2F78 #785A2F #2F785A
tetradic
#5A2F78 #78352F #4D782F #2F7278
square
#5A2F78 #78352F #4D782F #2F7278
split-complementary
#5A2F78 #72782F #2F7835
monochromatic
#180D20 #391E4C #5A2F78 #7B40A4 #9960C1

Accessibility & contrast

On white

9.94
#5A2F78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#5A2F78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F78
9.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F78#FFFFFF#000000##FFFFFF
##5A2F781.009.942.119.94
#FFFFFF9.941.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#14417A
Deuteranopia (green-blind)
#264376
Tritanopia (blue-blind)
#563D4F
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5a2f78;
/* rgb */ color: rgb(90, 47, 120);
/* oklch */ color: oklch(39.6% 0.124 309.0);
Tailwind
colors: {
  custom: {
    50: '#8b6a9f',
    500: '#5a2f78',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f78;
$custom-light: #8b6a9f;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f78",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 120
  },
  "hsl": {
    "h": 275.342,
    "s": 43.713,
    "l": 32.745
  },
  "oklch": {
    "l": 0.39613,
    "c": 0.12385,
    "h": 309
  },
  "luminance": 0.05563
}

Semantic roles & 50–950 ramp

primary
#5A2F78
secondary
#7BA85B
accent
#D35489
background
#F8F6F9
surface
#F0EBF2
border
#CBC6CC
text
#0C060E
muted
#7D7A7E

Preview Lab

Preview with #5A2F78

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

Preview Lab → · Contrast checker → · Palette generator →

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