#331A8B#331A8B

#331A8B is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.171 H 282.6°. Best body text is #FFFFFF at 12.64:1 contrast (WCAG AA passes).

Color values

HEX#331A8B
RGBrgb(51, 26, 139)
HSLhsl(253, 68%, 32%)
HSVhsv(253, 81%, 55%)
CMYKcmyk(63.3%, 81.3%, 0%, 45.5%)
CIE-LABlab(21.23, 42.87, -57.82)
CIE-LCHlch(21.23, 71.98, 306.55°)
OKLaboklab(34.03% 0.0372 -0.1668)
OKLCHoklch(34.03% 0.171 282.6)
XYZxyz(6.3934, 3.3062, 24.7224)
Luminance0.0331 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A8B #728B1A
analogous
#1A3A8B #331A8B #6B1A8B
triadic
#331A8B #8B331A #1A8B33
tetradic
#331A8B #8B1A3A #728B1A #1A8B6B
square
#331A8B #8B1A3A #728B1A #1A8B6B
split-complementary
#331A8B #8B6B1A #3A8B1A
monochromatic
#0D0724 #201057 #331A8B #4624BF #6543DC

Accessibility & contrast

On white

12.64
#331A8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#331A8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A8B
12.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A8B#FFFFFF#000000##FFFFFF
##331A8B1.0012.641.6612.64
#FFFFFF12.641.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368E
Deuteranopia (green-blind)
#002F89
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331a8b;
/* rgb */ color: rgb(51, 26, 139);
/* oklch */ color: oklch(34.0% 0.171 282.6);
Tailwind
colors: {
  custom: {
    50: '#775bae',
    500: '#331a8b',
    950: '#000000',
  },
}
SCSS
$custom: #331a8b;
$custom-light: #775bae;
$custom-dark: #000000;
JSON
{
  "hex": "#331a8b",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 139
  },
  "hsl": {
    "h": 253.274,
    "s": 68.485,
    "l": 32.353
  },
  "oklch": {
    "l": 0.34026,
    "c": 0.17088,
    "h": 282.6
  },
  "luminance": 0.03307
}

Semantic roles & 50–950 ramp

primary
#331A8B
secondary
#A2BD44
accent
#EB3CC5
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331A8B

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

Preview Lab → · Contrast checker → · Palette generator →

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