#331B7B#331B7B

#331B7B is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.5% C 0.150 H 286.0°. Best body text is #FFFFFF at 13.26:1 contrast (WCAG AA passes).

Color values

HEX#331B7B
RGBrgb(51, 27, 123)
HSLhsl(255, 64%, 29%)
HSVhsv(255, 78%, 48%)
CMYKcmyk(58.5%, 78%, 0%, 51.8%)
CIE-LABlab(19.71, 37.47, -50.23)
CIE-LCHlch(19.71, 62.67, 306.73°)
OKLaboklab(32.46% 0.0414 -0.1446)
OKLCHoklch(32.46% 0.15 286)
XYZxyz(5.3312, 2.9174, 19.0172)
Luminance0.0292 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7B #637B1B
analogous
#1B337B #331B7B #631B7B
triadic
#331B7B #7B331B #1B7B33
tetradic
#331B7B #7B1B33 #637B1B #1B7B63
square
#331B7B #7B1B33 #637B1B #1B7B63
split-complementary
#331B7B #7B631B #337B1B
monochromatic
#0A0619 #1E1049 #331B7B #4826AD #623CD4

Accessibility & contrast

On white

13.26
#331B7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331B7B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B7B
13.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7B#FFFFFF#000000##FFFFFF
##331B7B1.0013.261.5813.26
#FFFFFF13.261.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#002D79
Tritanopia (blue-blind)
#10364A
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331b7b;
/* rgb */ color: rgb(51, 27, 123);
/* oklch */ color: oklch(32.5% 0.150 286.0);
Tailwind
colors: {
  custom: {
    50: '#745aa2',
    500: '#331b7b',
    950: '#000000',
  },
}
SCSS
$custom: #331b7b;
$custom-light: #745aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7b",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 123
  },
  "hsl": {
    "h": 255,
    "s": 64,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32455,
    "c": 0.1504,
    "h": 286
  },
  "luminance": 0.02918
}

Semantic roles & 50–950 ramp

primary
#331B7B
secondary
#94AF43
accent
#E741BD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7B

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

Preview Lab → · Contrast checker → · Palette generator →

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