#331F84#331F84

#331F84 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 33.9% C 0.157 H 283.2°. Best body text is #FFFFFF at 12.57:1 contrast (WCAG AA passes).

Color values

HEX#331F84
RGBrgb(51, 31, 132)
HSLhsl(252, 62%, 32%)
HSVhsv(252, 77%, 52%)
CMYKcmyk(61.4%, 76.5%, 0%, 48.2%)
CIE-LABlab(21.39, 38.12, -53.16)
CIE-LCHlch(21.39, 65.42, 305.64°)
OKLaboklab(33.92% 0.0359 -0.1532)
OKLCHoklch(33.92% 0.157 283.2)
XYZxyz(6.0188, 3.3493, 22.1546)
Luminance0.0335 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F84 #70841F
analogous
#1F3E84 #331F84 #661F84
triadic
#331F84 #84331F #1F8433
tetradic
#331F84 #841F3E #70841F #1F8466
square
#331F84 #841F3E #70841F #1F8466
split-complementary
#331F84 #84661F #3E841F
monochromatic
#0D0821 #201352 #331F84 #462BB6 #6549D4

Accessibility & contrast

On white

12.57
#331F84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#331F84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F84
12.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F84#FFFFFF#000000##FFFFFF
##331F841.0012.571.6712.57
#FFFFFF12.571.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003687
Deuteranopia (green-blind)
#003082
Tritanopia (blue-blind)
#003B50
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331f84;
/* rgb */ color: rgb(51, 31, 132);
/* oklch */ color: oklch(33.9% 0.157 283.2);
Tailwind
colors: {
  custom: {
    50: '#755da9',
    500: '#331f84',
    950: '#000000',
  },
}
SCSS
$custom: #331f84;
$custom-light: #755da9;
$custom-dark: #000000;
JSON
{
  "hex": "#331f84",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 132
  },
  "hsl": {
    "h": 251.881,
    "s": 61.963,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33917,
    "c": 0.15737,
    "h": 283.2
  },
  "luminance": 0.0335
}

Semantic roles & 50–950 ramp

primary
#331F84
secondary
#A1B748
accent
#E543C5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331F84

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

Preview Lab → · Contrast checker → · Palette generator →

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