#331A87#331A87

#331A87 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.166 H 283.4°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#331A87
RGBrgb(51, 26, 135)
HSLhsl(254, 68%, 32%)
HSVhsv(254, 81%, 53%)
CMYKcmyk(62.2%, 80.7%, 0%, 47.1%)
CIE-LABlab(20.80, 41.66, -56.03)
CIE-LCHlch(20.80, 69.82, 306.63°)
OKLaboklab(33.59% 0.0385 -0.1616)
OKLCHoklch(33.59% 0.166 283.4)
XYZxyz(6.1065, 3.1915, 23.2112)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A87 #6E871A
analogous
#1A3887 #331A87 #6A1A87
triadic
#331A87 #87331A #1A8733
tetradic
#331A87 #871A38 #6E871A #1A876A
square
#331A87 #871A38 #6E871A #1A876A
split-complementary
#331A87 #876A1A #38871A
monochromatic
#0C0620 #201054 #331A87 #4624BA #6441DA

Accessibility & contrast

On white

12.82
#331A87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331A87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A87
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A87#FFFFFF#000000##FFFFFF
##331A871.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358A
Deuteranopia (green-blind)
#002E85
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331a87;
/* rgb */ color: rgb(51, 26, 135);
/* oklch */ color: oklch(33.6% 0.166 283.4);
Tailwind
colors: {
  custom: {
    50: '#765bab',
    500: '#331a87',
    950: '#000000',
  },
}
SCSS
$custom: #331a87;
$custom-light: #765bab;
$custom-dark: #000000;
JSON
{
  "hex": "#331a87",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 135
  },
  "hsl": {
    "h": 253.761,
    "s": 67.702,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33593,
    "c": 0.16608,
    "h": 283.4
  },
  "luminance": 0.03192
}

Semantic roles & 50–950 ramp

primary
#331A87
secondary
#9FBA42
accent
#EB3DC3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331A87

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

Preview Lab → · Contrast checker → · Palette generator →

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