#331F70#331F70

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

Color values

HEX#331F70
RGBrgb(51, 31, 112)
HSLhsl(255, 57%, 28%)
HSVhsv(255, 72%, 44%)
CMYKcmyk(54.5%, 72.3%, 0%, 56.1%)
CIE-LABlab(19.45, 31.76, -43.59)
CIE-LCHlch(19.45, 53.93, 306.07°)
OKLaboklab(31.94% 0.0404 -0.1252)
OKLCHoklch(31.94% 0.132 287.9)
XYZxyz(4.7790, 2.8534, 15.6250)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F70 #5C701F
analogous
#1F3370 #331F70 #5B1F70
triadic
#331F70 #70331F #1F7033
tetradic
#331F70 #701F33 #5C701F #1F705B
square
#331F70 #701F33 #5C701F #1F705B
split-complementary
#331F70 #705B1F #33701F
monochromatic
#0B0718 #1D1240 #331F70 #492CA0 #623FCA

Accessibility & contrast

On white

13.37
#331F70 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F70
13.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F70#FFFFFF#000000##FFFFFF
##331F701.0013.371.5713.37
#FFFFFF13.371.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003172
Deuteranopia (green-blind)
#002D6E
Tritanopia (blue-blind)
#1C3445
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331f70;
/* rgb */ color: rgb(51, 31, 112);
/* oklch */ color: oklch(31.9% 0.132 287.9);
Tailwind
colors: {
  custom: {
    50: '#725c9a',
    500: '#331f70',
    950: '#000000',
  },
}
SCSS
$custom: #331f70;
$custom-light: #725c9a;
$custom-dark: #000000;
JSON
{
  "hex": "#331f70",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 112
  },
  "hsl": {
    "h": 254.815,
    "s": 56.643,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31941,
    "c": 0.13154,
    "h": 287.9
  },
  "luminance": 0.02854
}

Semantic roles & 50–950 ramp

primary
#331F70
secondary
#8DA447
accent
#E048BA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F70

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

Preview Lab → · Contrast checker → · Palette generator →

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