#331986#331986

#331986 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.166 H 283.8°. Best body text is #FFFFFF at 12.93:1 contrast (WCAG AA passes).

Color values

HEX#331986
RGBrgb(51, 25, 134)
HSLhsl(254, 69%, 31%)
HSVhsv(254, 81%, 53%)
CMYKcmyk(61.9%, 81.3%, 0%, 47.5%)
CIE-LABlab(20.52, 41.84, -55.86)
CIE-LCHlch(20.52, 69.80, 306.83°)
OKLaboklab(33.37% 0.0394 -0.161)
OKLCHoklch(33.37% 0.166 283.8)
XYZxyz(6.0146, 3.1199, 22.8349)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331986 #6C8619
analogous
#193586 #331986 #691986
triadic
#331986 #863319 #198633
tetradic
#331986 #861935 #6C8619 #198669
square
#331986 #861935 #6C8619 #198669
split-complementary
#331986 #866919 #358619
monochromatic
#0C061F #1F0F52 #331986 #4723BA #643EDB

Accessibility & contrast

On white

12.93
#331986 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331986 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331986
12.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331986#FFFFFF#000000##FFFFFF
##3319861.0012.931.6212.93
#FFFFFF12.931.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003589
Deuteranopia (green-blind)
#002E84
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331986;
/* rgb */ color: rgb(51, 25, 134);
/* oklch */ color: oklch(33.4% 0.166 283.8);
Tailwind
colors: {
  custom: {
    50: '#765aaa',
    500: '#331986',
    950: '#000000',
  },
}
SCSS
$custom: #331986;
$custom-light: #765aaa;
$custom-dark: #000000;
JSON
{
  "hex": "#331986",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 134
  },
  "hsl": {
    "h": 254.312,
    "s": 68.553,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33368,
    "c": 0.16581,
    "h": 283.8
  },
  "luminance": 0.0312
}

Semantic roles & 50–950 ramp

primary
#331986
secondary
#9DBA41
accent
#EB3CC2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331986

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

Preview Lab → · Contrast checker → · Palette generator →

#331986 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva