#331B80#331B80

#331B80 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.157 H 284.8°. Best body text is #FFFFFF at 13.05:1 contrast (WCAG AA passes).

Color values

HEX#331B80
RGBrgb(51, 27, 128)
HSLhsl(254, 65%, 30%)
HSVhsv(254, 79%, 50%)
CMYKcmyk(60.2%, 78.9%, 0%, 49.8%)
CIE-LABlab(20.23, 39.02, -52.56)
CIE-LCHlch(20.23, 65.45, 306.59°)
OKLaboklab(32.97% 0.0399 -0.1514)
OKLCHoklch(32.97% 0.157 284.8)
XYZxyz(5.6523, 3.0458, 20.7080)
Luminance0.0305 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B80 #68801B
analogous
#1B3680 #331B80 #651B80
triadic
#331B80 #80331B #1B8033
tetradic
#331B80 #801B36 #68801B #1B8065
square
#331B80 #801B36 #68801B #1B8065
split-complementary
#331B80 #80651B #36801B
monochromatic
#0B061B #1F104D #331B80 #4726B3 #633FD6

Accessibility & contrast

On white

13.05
#331B80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331B80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B80
13.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B80#FFFFFF#000000##FFFFFF
##331B801.0013.051.6113.05
#FFFFFF13.051.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003483
Deuteranopia (green-blind)
#002E7E
Tritanopia (blue-blind)
#07384D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331b80;
/* rgb */ color: rgb(51, 27, 128);
/* oklch */ color: oklch(33.0% 0.157 284.8);
Tailwind
colors: {
  custom: {
    50: '#755ba6',
    500: '#331b80',
    950: '#000000',
  },
}
SCSS
$custom: #331b80;
$custom-light: #755ba6;
$custom-dark: #000000;
JSON
{
  "hex": "#331b80",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 128
  },
  "hsl": {
    "h": 254.257,
    "s": 65.161,
    "l": 30.392
  },
  "oklch": {
    "l": 0.32973,
    "c": 0.15659,
    "h": 284.8
  },
  "luminance": 0.03046
}

Semantic roles & 50–950 ramp

primary
#331B80
secondary
#99B443
accent
#E840C0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B80

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

Preview Lab → · Contrast checker → · Palette generator →

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