#331A78#331A78

#331A78 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.148 H 286.9°. Best body text is #FFFFFF at 13.46:1 contrast (WCAG AA passes).

Color values

HEX#331A78
RGBrgb(51, 26, 120)
HSLhsl(256, 64%, 29%)
HSVhsv(256, 78%, 47%)
CMYKcmyk(57.5%, 78.3%, 0%, 52.9%)
CIE-LABlab(19.22, 37.08, -49.12)
CIE-LCHlch(19.22, 61.54, 307.05°)
OKLaboklab(32.02% 0.043 -0.1413)
OKLCHoklch(32.02% 0.148 286.9)
XYZxyz(5.1238, 2.7984, 18.0358)
Luminance0.0280 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A78 #5F781A
analogous
#1A3078 #331A78 #621A78
triadic
#331A78 #78331A #1A7833
tetradic
#331A78 #781A30 #5F781A #1A7862
square
#331A78 #781A30 #5F781A #1A7862
split-complementary
#331A78 #78621A #30781A
monochromatic
#0B0519 #1E0F46 #331A78 #4825AA #6238D4

Accessibility & contrast

On white

13.46
#331A78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331A78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A78
13.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A78#FFFFFF#000000##FFFFFF
##331A781.0013.461.5613.46
#FFFFFF13.461.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317B
Deuteranopia (green-blind)
#002C76
Tritanopia (blue-blind)
#143448
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331a78;
/* rgb */ color: rgb(51, 26, 120);
/* oklch */ color: oklch(32.0% 0.148 286.9);
Tailwind
colors: {
  custom: {
    50: '#735aa0',
    500: '#331a78',
    950: '#000000',
  },
}
SCSS
$custom: #331a78;
$custom-light: #735aa0;
$custom-dark: #000000;
JSON
{
  "hex": "#331a78",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 120
  },
  "hsl": {
    "h": 255.957,
    "s": 64.384,
    "l": 28.627
  },
  "oklch": {
    "l": 0.32016,
    "c": 0.14774,
    "h": 286.9
  },
  "luminance": 0.02799
}

Semantic roles & 50–950 ramp

primary
#331A78
secondary
#90AC41
accent
#E740BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331A78

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

Preview Lab → · Contrast checker → · Palette generator →

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