#331A7D#331A7D

#331A7D is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.5% C 0.154 H 285.7°. Best body text is #FFFFFF at 13.25:1 contrast (WCAG AA passes).

Color values

HEX#331A7D
RGBrgb(51, 26, 125)
HSLhsl(255, 66%, 30%)
HSVhsv(255, 79%, 49%)
CMYKcmyk(59.2%, 79.2%, 0%, 51%)
CIE-LABlab(19.73, 38.61, -51.46)
CIE-LCHlch(19.73, 64.34, 306.88°)
OKLaboklab(32.53% 0.0415 -0.1482)
OKLCHoklch(32.53% 0.154 285.7)
XYZxyz(5.4352, 2.9229, 19.6758)
Luminance0.0292 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7D #647D1A
analogous
#1A327D #331A7D #651A7D
triadic
#331A7D #7D331A #1A7D33
tetradic
#331A7D #7D1A32 #647D1A #1A7D65
square
#331A7D #7D1A32 #647D1A #1A7D65
split-complementary
#331A7D #7D651A #327D1A
monochromatic
#0A0519 #1E0F4A #331A7D #4825B0 #623BD6

Accessibility & contrast

On white

13.25
#331A7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331A7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A7D
13.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7D#FFFFFF#000000##FFFFFF
##331A7D1.0013.251.5813.25
#FFFFFF13.251.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003280
Deuteranopia (green-blind)
#002D7B
Tritanopia (blue-blind)
#0D364B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331a7d;
/* rgb */ color: rgb(51, 26, 125);
/* oklch */ color: oklch(32.5% 0.154 285.7);
Tailwind
colors: {
  custom: {
    50: '#745aa4',
    500: '#331a7d',
    950: '#000000',
  },
}
SCSS
$custom: #331a7d;
$custom-light: #745aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7d",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 125
  },
  "hsl": {
    "h": 255.152,
    "s": 65.563,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32533,
    "c": 0.15392,
    "h": 285.7
  },
  "luminance": 0.02923
}

Semantic roles & 50–950 ramp

primary
#331A7D
secondary
#95B142
accent
#E93FBE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7D

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

Preview Lab → · Contrast checker → · Palette generator →

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