#331F72#331F72

#331F72 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.1% C 0.134 H 287.3°. Best body text is #FFFFFF at 13.29:1 contrast (WCAG AA passes).

Color values

HEX#331F72
RGBrgb(51, 31, 114)
HSLhsl(254, 57%, 28%)
HSVhsv(254, 73%, 45%)
CMYKcmyk(55.3%, 72.8%, 0%, 55.3%)
CIE-LABlab(19.63, 32.40, -44.58)
CIE-LCHlch(19.63, 55.11, 306.00°)
OKLaboklab(32.13% 0.04 -0.1281)
OKLCHoklch(32.13% 0.134 287.3)
XYZxyz(4.8916, 2.8984, 16.2180)
Luminance0.0290 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F72 #5E721F
analogous
#1F3472 #331F72 #5C1F72
triadic
#331F72 #72331F #1F7233
tetradic
#331F72 #721F34 #5E721F #1F725C
square
#331F72 #721F34 #5E721F #1F725C
split-complementary
#331F72 #725C1F #34721F
monochromatic
#0B0718 #1D1242 #331F72 #492CA2 #6240CB

Accessibility & contrast

On white

13.29
#331F72 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F72
13.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F72#FFFFFF#000000##FFFFFF
##331F721.0013.291.5813.29
#FFFFFF13.291.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003174
Deuteranopia (green-blind)
#002D70
Tritanopia (blue-blind)
#1A3546
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331f72;
/* rgb */ color: rgb(51, 31, 114);
/* oklch */ color: oklch(32.1% 0.134 287.3);
Tailwind
colors: {
  custom: {
    50: '#725c9b',
    500: '#331f72',
    950: '#000000',
  },
}
SCSS
$custom: #331f72;
$custom-light: #725c9b;
$custom-dark: #000000;
JSON
{
  "hex": "#331f72",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 114
  },
  "hsl": {
    "h": 254.458,
    "s": 57.241,
    "l": 28.431
  },
  "oklch": {
    "l": 0.32131,
    "c": 0.13419,
    "h": 287.3
  },
  "luminance": 0.02899
}

Semantic roles & 50–950 ramp

primary
#331F72
secondary
#8FA647
accent
#E047BC
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F72

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

Preview Lab → · Contrast checker → · Palette generator →

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