#331F82#331F82

#331F82 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.7% C 0.155 H 283.6°. Best body text is #FFFFFF at 12.66:1 contrast (WCAG AA passes).

Color values

HEX#331F82
RGBrgb(51, 31, 130)
HSLhsl(252, 61%, 32%)
HSVhsv(252, 76%, 51%)
CMYKcmyk(60.8%, 76.2%, 0%, 49%)
CIE-LABlab(21.19, 37.49, -52.24)
CIE-LCHlch(21.19, 64.30, 305.67°)
OKLaboklab(33.71% 0.0364 -0.1505)
OKLCHoklch(33.71% 0.155 283.6)
XYZxyz(5.8833, 3.2951, 21.4408)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F82 #6E821F
analogous
#1F3D82 #331F82 #651F82
triadic
#331F82 #82331F #1F8233
tetradic
#331F82 #821F3D #6E821F #1F8265
square
#331F82 #821F3D #6E821F #1F8265
split-complementary
#331F82 #82651F #3D821F
monochromatic
#0C071F #201351 #331F82 #462BB3 #6448D3

Accessibility & contrast

On white

12.66
#331F82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#331F82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F82
12.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F82#FFFFFF#000000##FFFFFF
##331F821.0012.661.6612.66
#FFFFFF12.661.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003685
Deuteranopia (green-blind)
#003080
Tritanopia (blue-blind)
#023B4F
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331f82;
/* rgb */ color: rgb(51, 31, 130);
/* oklch */ color: oklch(33.7% 0.155 283.6);
Tailwind
colors: {
  custom: {
    50: '#755da7',
    500: '#331f82',
    950: '#000000',
  },
}
SCSS
$custom: #331f82;
$custom-light: #755da7;
$custom-dark: #000000;
JSON
{
  "hex": "#331f82",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 130
  },
  "hsl": {
    "h": 252.121,
    "s": 61.491,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33712,
    "c": 0.15485,
    "h": 283.6
  },
  "luminance": 0.03295
}

Semantic roles & 50–950 ramp

primary
#331F82
secondary
#9FB548
accent
#E543C4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331F82

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

Preview Lab → · Contrast checker → · Palette generator →

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