#331A8A#331A8A

#331A8A is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.170 H 282.8°. Best body text is #FFFFFF at 12.68:1 contrast (WCAG AA passes).

Color values

HEX#331A8A
RGBrgb(51, 26, 138)
HSLhsl(253, 68%, 32%)
HSVhsv(253, 81%, 54%)
CMYKcmyk(63%, 81.2%, 0%, 45.9%)
CIE-LABlab(21.12, 42.57, -57.38)
CIE-LCHlch(21.12, 71.44, 306.57°)
OKLaboklab(33.92% 0.0375 -0.1655)
OKLCHoklch(33.92% 0.17 282.8)
XYZxyz(6.3207, 3.2771, 24.3393)
Luminance0.0328 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A8A #718A1A
analogous
#1A398A #331A8A #6B1A8A
triadic
#331A8A #8A331A #1A8A33
tetradic
#331A8A #8A1A39 #718A1A #1A8A6B
square
#331A8A #8A1A39 #718A1A #1A8A6B
split-complementary
#331A8A #8A6B1A #398A1A
monochromatic
#0D0723 #201057 #331A8A #4624BD #6543DC

Accessibility & contrast

On white

12.68
#331A8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A8A
12.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A8A#FFFFFF#000000##FFFFFF
##331A8A1.0012.681.6612.68
#FFFFFF12.681.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368D
Deuteranopia (green-blind)
#002F88
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331a8a;
/* rgb */ color: rgb(51, 26, 138);
/* oklch */ color: oklch(33.9% 0.170 282.8);
Tailwind
colors: {
  custom: {
    50: '#775bad',
    500: '#331a8a',
    950: '#000000',
  },
}
SCSS
$custom: #331a8a;
$custom-light: #775bad;
$custom-dark: #000000;
JSON
{
  "hex": "#331a8a",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 138
  },
  "hsl": {
    "h": 253.393,
    "s": 68.293,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33917,
    "c": 0.16968,
    "h": 282.8
  },
  "luminance": 0.03278
}

Semantic roles & 50–950 ramp

primary
#331A8A
secondary
#A2BD43
accent
#EB3DC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331A8A

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

Preview Lab → · Contrast checker → · Palette generator →

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