#331A7E#331A7E

#331A7E is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.6% C 0.155 H 285.4°. Best body text is #FFFFFF at 13.21:1 contrast (WCAG AA passes).

Color values

HEX#331A7E
RGBrgb(51, 26, 126)
HSLhsl(255, 66%, 30%)
HSVhsv(255, 79%, 49%)
CMYKcmyk(59.5%, 79.4%, 0%, 50.6%)
CIE-LABlab(19.84, 38.92, -51.93)
CIE-LCHlch(19.84, 64.89, 306.85°)
OKLaboklab(32.64% 0.0413 -0.1496)
OKLCHoklch(32.64% 0.155 285.4)
XYZxyz(5.4994, 2.9486, 20.0140)
Luminance0.0295 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7E #657E1A
analogous
#1A337E #331A7E #651A7E
triadic
#331A7E #7E331A #1A7E33
tetradic
#331A7E #7E1A33 #657E1A #1A7E65
square
#331A7E #7E1A33 #657E1A #1A7E65
split-complementary
#331A7E #7E651A #337E1A
monochromatic
#0A0519 #1E104B #331A7E #4824B1 #623CD7

Accessibility & contrast

On white

13.21
#331A7E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331A7E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A7E
13.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7E#FFFFFF#000000##FFFFFF
##331A7E1.0013.211.5913.21
#FFFFFF13.211.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003381
Deuteranopia (green-blind)
#002D7C
Tritanopia (blue-blind)
#0B374B
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331a7e;
/* rgb */ color: rgb(51, 26, 126);
/* oklch */ color: oklch(32.6% 0.155 285.4);
Tailwind
colors: {
  custom: {
    50: '#755aa4',
    500: '#331a7e',
    950: '#000000',
  },
}
SCSS
$custom: #331a7e;
$custom-light: #755aa4;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7e",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 126
  },
  "hsl": {
    "h": 255,
    "s": 65.789,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32638,
    "c": 0.15515,
    "h": 285.4
  },
  "luminance": 0.02949
}

Semantic roles & 50–950 ramp

primary
#331A7E
secondary
#96B242
accent
#E93FBE
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7E

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

Preview Lab → · Contrast checker → · Palette generator →

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