#331B7C#331B7C

#331B7C is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.6% C 0.152 H 285.7°. Best body text is #FFFFFF at 13.22:1 contrast (WCAG AA passes).

Color values

HEX#331B7C
RGBrgb(51, 27, 124)
HSLhsl(255, 64%, 30%)
HSVhsv(255, 78%, 49%)
CMYKcmyk(58.9%, 78.2%, 0%, 51.4%)
CIE-LABlab(19.81, 37.78, -50.70)
CIE-LCHlch(19.81, 63.23, 306.70°)
OKLaboklab(32.56% 0.0411 -0.146)
OKLCHoklch(32.56% 0.152 285.7)
XYZxyz(5.3942, 2.9426, 19.3486)
Luminance0.0294 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B7C #647C1B
analogous
#1B347C #331B7C #631B7C
triadic
#331B7C #7C331B #1B7C33
tetradic
#331B7C #7C1B34 #647C1B #1B7C63
square
#331B7C #7C1B34 #647C1B #1B7C63
split-complementary
#331B7C #7C631B #347C1B
monochromatic
#0A0519 #1E104A #331B7C #4826AE #623DD5

Accessibility & contrast

On white

13.22
#331B7C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331B7C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B7C
13.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B7C#FFFFFF#000000##FFFFFF
##331B7C1.0013.221.5913.22
#FFFFFF13.221.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327F
Deuteranopia (green-blind)
#002D7A
Tritanopia (blue-blind)
#0F364A
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331b7c;
/* rgb */ color: rgb(51, 27, 124);
/* oklch */ color: oklch(32.6% 0.152 285.7);
Tailwind
colors: {
  custom: {
    50: '#745aa3',
    500: '#331b7c',
    950: '#000000',
  },
}
SCSS
$custom: #331b7c;
$custom-light: #745aa3;
$custom-dark: #000000;
JSON
{
  "hex": "#331b7c",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 124
  },
  "hsl": {
    "h": 254.845,
    "s": 64.238,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32558,
    "c": 0.15165,
    "h": 285.7
  },
  "luminance": 0.02943
}

Semantic roles & 50–950 ramp

primary
#331B7C
secondary
#95B043
accent
#E741BE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331B7C

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

Preview Lab → · Contrast checker → · Palette generator →

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