#331A7B#331A7B

#331A7B is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.151 H 286.2°. Best body text is #FFFFFF at 13.34:1 contrast (WCAG AA passes).

Color values

HEX#331A7B
RGBrgb(51, 26, 123)
HSLhsl(255, 65%, 29%)
HSVhsv(255, 79%, 48%)
CMYKcmyk(58.5%, 78.9%, 0%, 51.8%)
CIE-LABlab(19.53, 38.00, -50.53)
CIE-LCHlch(19.53, 63.22, 306.94°)
OKLaboklab(32.32% 0.0421 -0.1455)
OKLCHoklch(32.32% 0.151 286.2)
XYZxyz(5.3087, 2.8724, 19.0097)
Luminance0.0287 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A7B #627B1A
analogous
#1A327B #331A7B #641A7B
triadic
#331A7B #7B331A #1A7B33
tetradic
#331A7B #7B1A32 #627B1A #1A7B64
square
#331A7B #7B1A32 #627B1A #1A7B64
split-complementary
#331A7B #7B641A #327B1A
monochromatic
#0A0519 #1E0F48 #331A7B #4825AE #623AD5

Accessibility & contrast

On white

13.34
#331A7B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A7B
13.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A7B#FFFFFF#000000##FFFFFF
##331A7B1.0013.341.5713.34
#FFFFFF13.341.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00327E
Deuteranopia (green-blind)
#002C79
Tritanopia (blue-blind)
#103649
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331a7b;
/* rgb */ color: rgb(51, 26, 123);
/* oklch */ color: oklch(32.3% 0.151 286.2);
Tailwind
colors: {
  custom: {
    50: '#745aa2',
    500: '#331a7b',
    950: '#000000',
  },
}
SCSS
$custom: #331a7b;
$custom-light: #745aa2;
$custom-dark: #000000;
JSON
{
  "hex": "#331a7b",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 123
  },
  "hsl": {
    "h": 255.464,
    "s": 65.101,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32325,
    "c": 0.15146,
    "h": 286.2
  },
  "luminance": 0.02873
}

Semantic roles & 50–950 ramp

primary
#331A7B
secondary
#93AF42
accent
#E840BD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331A7B

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

Preview Lab → · Contrast checker → · Palette generator →

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