#331F81#331F81

#331F81 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.6% C 0.154 H 283.8°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).

Color values

HEX#331F81
RGBrgb(51, 31, 129)
HSLhsl(252, 61%, 31%)
HSVhsv(252, 76%, 51%)
CMYKcmyk(60.5%, 76%, 0%, 49.4%)
CIE-LABlab(21.09, 37.17, -51.77)
CIE-LCHlch(21.09, 63.73, 305.68°)
OKLaboklab(33.61% 0.0366 -0.1491)
OKLCHoklch(33.61% 0.154 283.8)
XYZxyz(5.8165, 3.2684, 21.0890)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F81 #6D811F
analogous
#1F3C81 #331F81 #641F81
triadic
#331F81 #81331F #1F8133
tetradic
#331F81 #811F3C #6D811F #1F8164
square
#331F81 #811F3C #6D811F #1F8164
split-complementary
#331F81 #81641F #3C811F
monochromatic
#0C071E #1F1350 #331F81 #472BB2 #6447D3

Accessibility & contrast

On white

12.70
#331F81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F81
12.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F81#FFFFFF#000000##FFFFFF
##331F811.0012.701.6512.70
#FFFFFF12.701.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003684
Deuteranopia (green-blind)
#002F7F
Tritanopia (blue-blind)
#043A4E
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331f81;
/* rgb */ color: rgb(51, 31, 129);
/* oklch */ color: oklch(33.6% 0.154 283.8);
Tailwind
colors: {
  custom: {
    50: '#755da7',
    500: '#331f81',
    950: '#000000',
  },
}
SCSS
$custom: #331f81;
$custom-light: #755da7;
$custom-dark: #000000;
JSON
{
  "hex": "#331f81",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 129
  },
  "hsl": {
    "h": 252.245,
    "s": 61.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.3361,
    "c": 0.15358,
    "h": 283.8
  },
  "luminance": 0.03269
}

Semantic roles & 50–950 ramp

primary
#331F81
secondary
#9EB448
accent
#E443C4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F81

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

Preview Lab → · Contrast checker → · Palette generator →

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