#331A82#331A82

#331A82 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.160 H 284.5°. Best body text is #FFFFFF at 13.04:1 contrast (WCAG AA passes).

Color values

HEX#331A82
RGBrgb(51, 26, 130)
HSLhsl(254, 67%, 31%)
HSVhsv(254, 80%, 51%)
CMYKcmyk(60.8%, 80%, 0%, 49%)
CIE-LABlab(20.26, 40.14, -53.77)
CIE-LCHlch(20.26, 67.10, 306.74°)
OKLaboklab(33.06% 0.04 -0.1549)
OKLCHoklch(33.06% 0.16 284.5)
XYZxyz(5.7627, 3.0539, 21.4006)
Luminance0.0305 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A82 #69821A
analogous
#1A3582 #331A82 #671A82
triadic
#331A82 #82331A #1A8233
tetradic
#331A82 #821A35 #69821A #1A8267
square
#331A82 #821A35 #69821A #1A8267
split-complementary
#331A82 #82671A #35821A
monochromatic
#0B061C #1F104F #331A82 #4724B5 #633ED8

Accessibility & contrast

On white

13.04
#331A82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331A82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A82
13.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A82#FFFFFF#000000##FFFFFF
##331A821.0013.041.6113.04
#FFFFFF13.041.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003485
Deuteranopia (green-blind)
#002E80
Tritanopia (blue-blind)
#03384D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331a82;
/* rgb */ color: rgb(51, 26, 130);
/* oklch */ color: oklch(33.1% 0.160 284.5);
Tailwind
colors: {
  custom: {
    50: '#755aa7',
    500: '#331a82',
    950: '#000000',
  },
}
SCSS
$custom: #331a82;
$custom-light: #755aa7;
$custom-dark: #000000;
JSON
{
  "hex": "#331a82",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 130
  },
  "hsl": {
    "h": 254.423,
    "s": 66.667,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33059,
    "c": 0.16004,
    "h": 284.5
  },
  "luminance": 0.03054
}

Semantic roles & 50–950 ramp

primary
#331A82
secondary
#9AB642
accent
#EA3EC0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331A82

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

Preview Lab → · Contrast checker → · Palette generator →

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