#331A97#331A97

#331A97 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.4% C 0.185 H 280.4°. Best body text is #FFFFFF at 12.10:1 contrast (WCAG AA passes).

Color values

HEX#331A97
RGBrgb(51, 26, 151)
HSLhsl(252, 71%, 35%)
HSVhsv(252, 83%, 59%)
CMYKcmyk(66.2%, 82.8%, 0%, 40.8%)
CIE-LABlab(22.57, 46.46, -63.05)
CIE-LCHlch(22.57, 78.32, 306.39°)
OKLaboklab(35.35% 0.0334 -0.182)
OKLCHoklch(35.35% 0.185 280.4)
XYZxyz(7.3188, 3.6764, 29.5961)
Luminance0.0368 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A97 #7E971A
analogous
#1A4097 #331A97 #721A97
triadic
#331A97 #97331A #1A9733
tetradic
#331A97 #971A40 #7E971A #1A9772
square
#331A97 #971A40 #7E971A #1A9772
split-complementary
#331A97 #97721A #40971A
monochromatic
#10082F #211163 #331A97 #4523CB #694BE0

Accessibility & contrast

On white

12.10
#331A97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#331A97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A97
12.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A97#FFFFFF#000000##FFFFFF
##331A971.0012.101.7412.10
#FFFFFF12.101.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A9A
Deuteranopia (green-blind)
#003195
Tritanopia (blue-blind)
#00415A
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331a97;
/* rgb */ color: rgb(51, 26, 151);
/* oklch */ color: oklch(35.4% 0.185 280.4);
Tailwind
colors: {
  custom: {
    50: '#7a5cb7',
    500: '#331a97',
    950: '#000000',
  },
}
SCSS
$custom: #331a97;
$custom-light: #7a5cb7;
$custom-dark: #000000;
JSON
{
  "hex": "#331a97",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 151
  },
  "hsl": {
    "h": 252,
    "s": 70.621,
    "l": 34.706
  },
  "oklch": {
    "l": 0.3535,
    "c": 0.18503,
    "h": 280.4
  },
  "luminance": 0.03677
}

Semantic roles & 50–950 ramp

primary
#331A97
secondary
#AAC24B
accent
#ED3ACA
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331A97

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

Preview Lab → · Contrast checker → · Palette generator →

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