#5F21A4#5F21A4

#5F21A4 is a dark, vivid violet. Relative luminance 0.062; OKLCH L 42.0% C 0.192 H 299.1°. Best body text is #FFFFFF at 9.37:1 contrast (WCAG AA passes).

Color values

HEX#5F21A4
RGBrgb(95, 33, 164)
HSLhsl(268, 66%, 39%)
HSVhsv(268, 80%, 64%)
CMYKcmyk(42.1%, 79.9%, 0%, 35.7%)
CIE-LABlab(29.91, 52.67, -58.73)
CIE-LCHlch(29.91, 78.88, 311.89°)
OKLaboklab(41.99% 0.0935 -0.168)
OKLCHoklch(41.99% 0.192 299.1)
XYZxyz(11.9623, 6.2008, 35.6814)
Luminance0.0620 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F21A4 #66A421
analogous
#2124A4 #5F21A4 #A021A4
triadic
#5F21A4 #A45F21 #21A45F
tetradic
#5F21A4 #A42124 #66A421 #21A4A0
square
#5F21A4 #A42124 #66A421 #21A4A0
split-complementary
#5F21A4 #A4A021 #24A421
monochromatic
#240C3E #411771 #5F21A4 #7D2DD5 #9C60DF

Accessibility & contrast

On white

9.37
#5F21A4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#5F21A4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F21A4
9.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F21A4#FFFFFF#000000##FFFFFF
##5F21A41.009.372.249.37
#FFFFFF9.371.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A8
Deuteranopia (green-blind)
#0045A2
Tritanopia (blue-blind)
#4E4563
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5f21a4;
/* rgb */ color: rgb(95, 33, 164);
/* oklch */ color: oklch(42.0% 0.192 299.1);
Tailwind
colors: {
  custom: {
    50: '#9364c0',
    500: '#5f21a4',
    950: '#000000',
  },
}
SCSS
$custom: #5f21a4;
$custom-light: #9364c0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f21a4",
  "rgb": {
    "r": 95,
    "g": 33,
    "b": 164
  },
  "hsl": {
    "h": 268.397,
    "s": 66.497,
    "l": 38.627
  },
  "oklch": {
    "l": 0.41986,
    "c": 0.19226,
    "h": 299.1
  },
  "luminance": 0.06201
}

Semantic roles & 50–950 ramp

primary
#5F21A4
secondary
#93C45D
accent
#E93E98
background
#F9F6FB
surface
#F2EBF7
border
#CCC6D0
text
#0E0612
muted
#7E7A81

Preview Lab

Preview with #5F21A4

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

Preview Lab → · Contrast checker → · Palette generator →

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