#331B7A#331B7A

#331B7A is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.149 H 286.2°. Best body text is #FFFFFF at 13.30:1 contrast (WCAG AA passes).

Color values

HEX#331B7A
RGBrgb(51, 27, 122)
HSLhsl(255, 64%, 29%)
HSVhsv(255, 78%, 48%)
CMYKcmyk(58.2%, 77.9%, 0%, 52.2%)
CIE-LABlab(19.61, 37.17, -49.76)
CIE-LCHlch(19.61, 62.10, 306.76°)
OKLaboklab(32.35% 0.0416 -0.1432)
OKLCHoklch(32.35% 0.149 286.2)
XYZxyz(5.2690, 2.8925, 18.6893)
Luminance0.0289 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7A #627A1B
analogous
#1B337A #331B7A #631B7A
triadic
#331B7A #7A331B #1B7A33
tetradic
#331B7A #7A1B33 #627A1B #1B7A63
square
#331B7A #7A1B33 #627A1B #1B7A63
split-complementary
#331B7A #7A631B #337A1B
monochromatic
#0A0619 #1E1048 #331B7A #4826AC #623CD4

Accessibility & contrast

On white

13.30
#331B7A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B7A
13.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7A#FFFFFF#000000##FFFFFF
##331B7A1.0013.301.5813.30
#FFFFFF13.301.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327D
Deuteranopia (green-blind)
#002D78
Tritanopia (blue-blind)
#123649
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331b7a;
/* rgb */ color: rgb(51, 27, 122);
/* oklch */ color: oklch(32.4% 0.149 286.2);
Tailwind
colors: {
  custom: {
    50: '#745aa1',
    500: '#331b7a',
    950: '#000000',
  },
}
SCSS
$custom: #331b7a;
$custom-light: #745aa1;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7a",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 122
  },
  "hsl": {
    "h": 255.158,
    "s": 63.758,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32353,
    "c": 0.14916,
    "h": 286.2
  },
  "luminance": 0.02893
}

Semantic roles & 50–950 ramp

primary
#331B7A
secondary
#93AE43
accent
#E741BD
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7A

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

Preview Lab → · Contrast checker → · Palette generator →

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