#331F83#331F83

#331F83 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.156 H 283.4°. Best body text is #FFFFFF at 12.62:1 contrast (WCAG AA passes).

Color values

HEX#331F83
RGBrgb(51, 31, 131)
HSLhsl(252, 62%, 32%)
HSVhsv(252, 76%, 51%)
CMYKcmyk(61.1%, 76.3%, 0%, 48.6%)
CIE-LABlab(21.29, 37.81, -52.70)
CIE-LCHlch(21.29, 64.86, 305.65°)
OKLaboklab(33.81% 0.0361 -0.1519)
OKLCHoklch(33.81% 0.156 283.4)
XYZxyz(5.9507, 3.3221, 21.7960)
Luminance0.0332 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F83 #6F831F
analogous
#1F3D83 #331F83 #651F83
triadic
#331F83 #83331F #1F8333
tetradic
#331F83 #831F3D #6F831F #1F8365
square
#331F83 #831F3D #6F831F #1F8365
split-complementary
#331F83 #83651F #3D831F
monochromatic
#0C0820 #201352 #331F83 #462BB4 #6449D4

Accessibility & contrast

On white

12.62
#331F83 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F83
12.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F83#FFFFFF#000000##FFFFFF
##331F831.0012.621.6612.62
#FFFFFF12.621.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003686
Deuteranopia (green-blind)
#003081
Tritanopia (blue-blind)
#003B4F
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331f83;
/* rgb */ color: rgb(51, 31, 131);
/* oklch */ color: oklch(33.8% 0.156 283.4);
Tailwind
colors: {
  custom: {
    50: '#755da8',
    500: '#331f83',
    950: '#000000',
  },
}
SCSS
$custom: #331f83;
$custom-light: #755da8;
$custom-dark: #000000;
JSON
{
  "hex": "#331f83",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 131
  },
  "hsl": {
    "h": 252,
    "s": 61.728,
    "l": 31.765
  },
  "oklch": {
    "l": 0.33814,
    "c": 0.15611,
    "h": 283.4
  },
  "luminance": 0.03322
}

Semantic roles & 50–950 ramp

primary
#331F83
secondary
#A0B648
accent
#E543C4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331F83

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

Preview Lab → · Contrast checker → · Palette generator →

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