#331C87#331C87

#331C87 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.164 H 283.1°. Best body text is #FFFFFF at 12.68:1 contrast (WCAG AA passes).

Color values

HEX#331C87
RGBrgb(51, 28, 135)
HSLhsl(253, 66%, 32%)
HSVhsv(253, 79%, 53%)
CMYKcmyk(62.2%, 79.3%, 0%, 47.1%)
CIE-LABlab(21.14, 40.65, -55.46)
CIE-LCHlch(21.14, 68.76, 306.24°)
OKLaboklab(33.84% 0.0372 -0.1599)
OKLCHoklch(33.84% 0.164 283.1)
XYZxyz(6.1523, 3.2832, 23.2265)
Luminance0.0328 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C87 #70871C
analogous
#1C3B87 #331C87 #691C87
triadic
#331C87 #87331C #1C8733
tetradic
#331C87 #871C3B #70871C #1C8769
square
#331C87 #871C3B #70871C #1C8769
split-complementary
#331C87 #87691C #3B871C
monochromatic
#0D0722 #201154 #331C87 #4627BA #6545D8

Accessibility & contrast

On white

12.68
#331C87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#331C87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C87
12.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C87#FFFFFF#000000##FFFFFF
##331C871.0012.681.6612.68
#FFFFFF12.681.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368A
Deuteranopia (green-blind)
#002F85
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331c87;
/* rgb */ color: rgb(51, 28, 135);
/* oklch */ color: oklch(33.8% 0.164 283.1);
Tailwind
colors: {
  custom: {
    50: '#765cab',
    500: '#331c87',
    950: '#000000',
  },
}
SCSS
$custom: #331c87;
$custom-light: #765cab;
$custom-dark: #000000;
JSON
{
  "hex": "#331c87",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 135
  },
  "hsl": {
    "h": 252.897,
    "s": 65.644,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33837,
    "c": 0.16417,
    "h": 283.1
  },
  "luminance": 0.03284
}

Semantic roles & 50–950 ramp

primary
#331C87
secondary
#A1BA45
accent
#E93FC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331C87

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

Preview Lab → · Contrast checker → · Palette generator →

#331C87 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva