#331E71#331E71

#331E71 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.134 H 287.9°. Best body text is #FFFFFF at 13.42:1 contrast (WCAG AA passes).

Color values

HEX#331E71
RGBrgb(51, 30, 113)
HSLhsl(255, 58%, 28%)
HSVhsv(255, 73%, 44%)
CMYKcmyk(54.9%, 73.5%, 0%, 55.7%)
CIE-LABlab(19.33, 32.67, -44.44)
CIE-LCHlch(19.33, 55.15, 306.32°)
OKLaboklab(31.88% 0.0412 -0.1277)
OKLCHoklch(31.88% 0.134 287.9)
XYZxyz(4.8093, 2.8244, 15.9113)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E71 #5C711E
analogous
#1E3271 #331E71 #5C1E71
triadic
#331E71 #71331E #1E7133
tetradic
#331E71 #711E32 #5C711E #1E715C
square
#331E71 #711E32 #5C711E #1E715C
split-complementary
#331E71 #715C1E #32711E
monochromatic
#0B0618 #1D1141 #331E71 #492BA1 #623ECC

Accessibility & contrast

On white

13.42
#331E71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331E71
13.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E71#FFFFFF#000000##FFFFFF
##331E711.0013.421.5713.42
#FFFFFF13.421.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003173
Deuteranopia (green-blind)
#002D6F
Tritanopia (blue-blind)
#1B3445
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331e71;
/* rgb */ color: rgb(51, 30, 113);
/* oklch */ color: oklch(31.9% 0.134 287.9);
Tailwind
colors: {
  custom: {
    50: '#725c9b',
    500: '#331e71',
    950: '#000000',
  },
}
SCSS
$custom: #331e71;
$custom-light: #725c9b;
$custom-dark: #000000;
JSON
{
  "hex": "#331e71",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 113
  },
  "hsl": {
    "h": 255.181,
    "s": 58.042,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31884,
    "c": 0.13413,
    "h": 287.9
  },
  "luminance": 0.02825
}

Semantic roles & 50–950 ramp

primary
#331E71
secondary
#8DA546
accent
#E147BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331E71

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

Preview Lab → · Contrast checker → · Palette generator →

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