#331A7A#331A7A

#331A7A is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.150 H 286.4°. Best body text is #FFFFFF at 13.38:1 contrast (WCAG AA passes).

Color values

HEX#331A7A
RGBrgb(51, 26, 122)
HSLhsl(256, 65%, 29%)
HSVhsv(256, 79%, 48%)
CMYKcmyk(58.2%, 78.7%, 0%, 52.2%)
CIE-LABlab(19.42, 37.69, -50.06)
CIE-LCHlch(19.42, 62.67, 306.98°)
OKLaboklab(32.22% 0.0424 -0.1441)
OKLCHoklch(32.22% 0.15 286.4)
XYZxyz(5.2464, 2.8474, 18.6817)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7A #617A1A
analogous
#1A317A #331A7A #631A7A
triadic
#331A7A #7A331A #1A7A33
tetradic
#331A7A #7A1A31 #617A1A #1A7A63
square
#331A7A #7A1A31 #617A1A #1A7A63
split-complementary
#331A7A #7A631A #317A1A
monochromatic
#0B0519 #1E0F48 #331A7A #4825AC #6239D5

Accessibility & contrast

On white

13.38
#331A7A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#331A7A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A7A
13.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7A#FFFFFF#000000##FFFFFF
##331A7A1.0013.381.5713.38
#FFFFFF13.381.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317D
Deuteranopia (green-blind)
#002C78
Tritanopia (blue-blind)
#123549
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331a7a;
/* rgb */ color: rgb(51, 26, 122);
/* oklch */ color: oklch(32.2% 0.150 286.4);
Tailwind
colors: {
  custom: {
    50: '#745aa1',
    500: '#331a7a',
    950: '#000000',
  },
}
SCSS
$custom: #331a7a;
$custom-light: #745aa1;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7a",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 122
  },
  "hsl": {
    "h": 255.625,
    "s": 64.865,
    "l": 29.02
  },
  "oklch": {
    "l": 0.32222,
    "c": 0.15022,
    "h": 286.4
  },
  "luminance": 0.02848
}

Semantic roles & 50–950 ramp

primary
#331A7A
secondary
#92AE41
accent
#E840BC
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7A

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

Preview Lab → · Contrast checker → · Palette generator →

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