#331F91#331F91

#331F91 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.3% C 0.173 H 280.8°. Best body text is #FFFFFF at 12.03:1 contrast (WCAG AA passes).

Color values

HEX#331F91
RGBrgb(51, 31, 145)
HSLhsl(251, 65%, 35%)
HSVhsv(251, 79%, 57%)
CMYKcmyk(64.8%, 78.6%, 0%, 43.1%)
CIE-LABlab(22.75, 42.20, -59.05)
CIE-LCHlch(22.75, 72.58, 305.55°)
OKLaboklab(35.28% 0.0324 -0.1704)
OKLCHoklch(35.28% 0.173 280.8)
XYZxyz(6.9644, 3.7276, 27.1351)
Luminance0.0373 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F91 #7D911F
analogous
#1F4491 #331F91 #6C1F91
triadic
#331F91 #91331F #1F9133
tetradic
#331F91 #911F44 #7D911F #1F916C
square
#331F91 #911F44 #7D911F #1F916C
split-complementary
#331F91 #916C1F #44911F
monochromatic
#10092C #21145F #331F91 #452AC3 #6951DA

Accessibility & contrast

On white

12.03
#331F91 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#331F91 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F91
12.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F91#FFFFFF#000000##FFFFFF
##331F911.0012.031.7512.03
#FFFFFF12.031.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A94
Deuteranopia (green-blind)
#00328F
Tritanopia (blue-blind)
#004057
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331f91;
/* rgb */ color: rgb(51, 31, 145);
/* oklch */ color: oklch(35.3% 0.173 280.8);
Tailwind
colors: {
  custom: {
    50: '#785eb2',
    500: '#331f91',
    950: '#000000',
  },
}
SCSS
$custom: #331f91;
$custom-light: #785eb2;
$custom-dark: #000000;
JSON
{
  "hex": "#331f91",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 145
  },
  "hsl": {
    "h": 250.526,
    "s": 64.773,
    "l": 34.51
  },
  "oklch": {
    "l": 0.35278,
    "c": 0.17346,
    "h": 280.8
  },
  "luminance": 0.03728
}

Semantic roles & 50–950 ramp

primary
#331F91
secondary
#AABD4F
accent
#E840CA
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331F91

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

Preview Lab → · Contrast checker → · Palette generator →

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