#331B77#331B77

#331B77 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.145 H 287.0°. Best body text is #FFFFFF at 13.43:1 contrast (WCAG AA passes).

Color values

HEX#331B77
RGBrgb(51, 27, 119)
HSLhsl(256, 63%, 29%)
HSVhsv(256, 77%, 47%)
CMYKcmyk(57.1%, 77.3%, 0%, 53.3%)
CIE-LABlab(19.31, 36.24, -48.33)
CIE-LCHlch(19.31, 60.41, 306.86°)
OKLaboklab(32.05% 0.0425 -0.1391)
OKLCHoklch(32.05% 0.145 287)
XYZxyz(5.0860, 2.8193, 17.7254)
Luminance0.0282 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B77 #5F771B
analogous
#1B3177 #331B77 #611B77
triadic
#331B77 #77331B #1B7733
tetradic
#331B77 #771B31 #5F771B #1B7761
square
#331B77 #771B31 #5F771B #1B7761
split-complementary
#331B77 #77611B #31771B
monochromatic
#0B0619 #1E1045 #331B77 #4826A9 #623AD2

Accessibility & contrast

On white

13.43
#331B77 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331B77 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B77
13.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B77#FFFFFF#000000##FFFFFF
##331B771.0013.431.5613.43
#FFFFFF13.431.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317A
Deuteranopia (green-blind)
#002C75
Tritanopia (blue-blind)
#153447
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331b77;
/* rgb */ color: rgb(51, 27, 119);
/* oklch */ color: oklch(32.0% 0.145 287.0);
Tailwind
colors: {
  custom: {
    50: '#735a9f',
    500: '#331b77',
    950: '#000000',
  },
}
SCSS
$custom: #331b77;
$custom-light: #735a9f;
$custom-dark: #000000;
JSON
{
  "hex": "#331b77",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 119
  },
  "hsl": {
    "h": 255.652,
    "s": 63.014,
    "l": 28.627
  },
  "oklch": {
    "l": 0.32047,
    "c": 0.14539,
    "h": 287
  },
  "luminance": 0.0282
}

Semantic roles & 50–950 ramp

primary
#331B77
secondary
#90AB42
accent
#E642BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331B77

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

Preview Lab → · Contrast checker → · Palette generator →

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