#331A99#331A99

#331A99 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.6% C 0.187 H 280.0°. Best body text is #FFFFFF at 12.01:1 contrast (WCAG AA passes).

Color values

HEX#331A99
RGBrgb(51, 26, 153)
HSLhsl(252, 71%, 35%)
HSVhsv(252, 83%, 60%)
CMYKcmyk(66.7%, 83%, 0%, 40%)
CIE-LABlab(22.80, 47.06, -63.91)
CIE-LCHlch(22.80, 79.36, 306.36°)
OKLaboklab(35.57% 0.0327 -0.1845)
OKLCHoklch(35.57% 0.187 280)
XYZxyz(7.4826, 3.7419, 30.4588)
Luminance0.0374 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A99 #80991A
analogous
#1A4099 #331A99 #721A99
triadic
#331A99 #99331A #1A9933
tetradic
#331A99 #991A40 #80991A #1A9972
square
#331A99 #991A40 #80991A #1A9972
split-complementary
#331A99 #99721A #40991A
monochromatic
#100830 #221165 #331A99 #4423CD #6A4DE1

Accessibility & contrast

On white

12.01
#331A99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#331A99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A99
12.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A99#FFFFFF#000000##FFFFFF
##331A991.0012.011.7512.01
#FFFFFF12.011.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9C
Deuteranopia (green-blind)
#003297
Tritanopia (blue-blind)
#00425B
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331a99;
/* rgb */ color: rgb(51, 26, 153);
/* oklch */ color: oklch(35.6% 0.187 280.0);
Tailwind
colors: {
  custom: {
    50: '#7a5cb8',
    500: '#331a99',
    950: '#000000',
  },
}
SCSS
$custom: #331a99;
$custom-light: #7a5cb8;
$custom-dark: #000000;
JSON
{
  "hex": "#331a99",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 153
  },
  "hsl": {
    "h": 251.811,
    "s": 70.95,
    "l": 35.098
  },
  "oklch": {
    "l": 0.35574,
    "c": 0.18736,
    "h": 280
  },
  "luminance": 0.03743
}

Semantic roles & 50–950 ramp

primary
#331A99
secondary
#ABC34C
accent
#EE3ACA
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331A99

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

Preview Lab → · Contrast checker → · Palette generator →

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