#331F80#331F80

#331F80 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.152 H 284.0°. Best body text is #FFFFFF at 12.74:1 contrast (WCAG AA passes).

Color values

HEX#331F80
RGBrgb(51, 31, 128)
HSLhsl(252, 61%, 31%)
HSVhsv(252, 76%, 50%)
CMYKcmyk(60.2%, 75.8%, 0%, 49.8%)
CIE-LABlab(20.99, 36.86, -51.30)
CIE-LCHlch(20.99, 63.17, 305.69°)
OKLaboklab(33.51% 0.0369 -0.1478)
OKLCHoklch(33.51% 0.152 284)
XYZxyz(5.7503, 3.2419, 20.7406)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F80 #6C801F
analogous
#1F3B80 #331F80 #631F80
triadic
#331F80 #80331F #1F8033
tetradic
#331F80 #801F3B #6C801F #1F8063
square
#331F80 #801F3B #6C801F #1F8063
split-complementary
#331F80 #80631F #3B801F
monochromatic
#0C071D #1F134F #331F80 #472BB1 #6447D2

Accessibility & contrast

On white

12.74
#331F80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#331F80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F80
12.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F80#FFFFFF#000000##FFFFFF
##331F801.0012.741.6512.74
#FFFFFF12.741.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003583
Deuteranopia (green-blind)
#002F7E
Tritanopia (blue-blind)
#063A4E
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331f80;
/* rgb */ color: rgb(51, 31, 128);
/* oklch */ color: oklch(33.5% 0.152 284.0);
Tailwind
colors: {
  custom: {
    50: '#755da6',
    500: '#331f80',
    950: '#000000',
  },
}
SCSS
$custom: #331f80;
$custom-light: #755da6;
$custom-dark: #000000;
JSON
{
  "hex": "#331f80",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 128
  },
  "hsl": {
    "h": 252.371,
    "s": 61.006,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33509,
    "c": 0.15231,
    "h": 284
  },
  "luminance": 0.03242
}

Semantic roles & 50–950 ramp

primary
#331F80
secondary
#9DB348
accent
#E444C3
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F80

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

Preview Lab → · Contrast checker → · Palette generator →

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