#331B9E#331B9E

#331B9E is a dark, vivid violet. Relative luminance 0.040; OKLCH L 36.2% C 0.192 H 279.2°. Best body text is #FFFFFF at 11.72:1 contrast (WCAG AA passes).

Color values

HEX#331B9E
RGBrgb(51, 27, 158)
HSLhsl(251, 71%, 36%)
HSVhsv(251, 83%, 62%)
CMYKcmyk(67.7%, 82.9%, 0%, 38%)
CIE-LABlab(23.52, 48.09, -65.77)
CIE-LCHlch(23.52, 81.48, 306.17°)
OKLaboklab(36.24% 0.0306 -0.1899)
OKLCHoklch(36.24% 0.192 279.2)
XYZxyz(7.9268, 3.9556, 32.6869)
Luminance0.0396 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B9E #869E1B
analogous
#1B459E #331B9E #751B9E
triadic
#331B9E #9E331B #1B9E33
tetradic
#331B9E #9E1B45 #869E1B #1B9E75
square
#331B9E #9E1B45 #869E1B #1B9E75
split-complementary
#331B9E #9E751B #459E1B
monochromatic
#110935 #22126A #331B9E #4424D2 #6C52E1

Accessibility & contrast

On white

11.72
#331B9E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#331B9E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B9E
11.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B9E#FFFFFF#000000##FFFFFF
##331B9E1.0011.721.7911.72
#FFFFFF11.721.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003DA2
Deuteranopia (green-blind)
#00339C
Tritanopia (blue-blind)
#00445E
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331b9e;
/* rgb */ color: rgb(51, 27, 158);
/* oklch */ color: oklch(36.2% 0.192 279.2);
Tailwind
colors: {
  custom: {
    50: '#7b5dbc',
    500: '#331b9e',
    950: '#000000',
  },
}
SCSS
$custom: #331b9e;
$custom-light: #7b5dbc;
$custom-dark: #000000;
JSON
{
  "hex": "#331b9e",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 158
  },
  "hsl": {
    "h": 250.992,
    "s": 70.811,
    "l": 36.275
  },
  "oklch": {
    "l": 0.36242,
    "c": 0.19238,
    "h": 279.2
  },
  "luminance": 0.03956
}

Semantic roles & 50–950 ramp

primary
#331B9E
secondary
#AFC451
accent
#EE3ACD
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331B9E

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

Preview Lab → · Contrast checker → · Palette generator →

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