#331F8D#331F8D

#331F8D is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.9% C 0.169 H 281.5°. Best body text is #FFFFFF at 12.20:1 contrast (WCAG AA passes).

Color values

HEX#331F8D
RGBrgb(51, 31, 141)
HSLhsl(251, 64%, 34%)
HSVhsv(251, 78%, 55%)
CMYKcmyk(63.8%, 78%, 0%, 44.7%)
CIE-LABlab(22.32, 40.95, -57.26)
CIE-LCHlch(22.32, 70.40, 305.57°)
OKLaboklab(34.85% 0.0335 -0.1652)
OKLCHoklch(34.85% 0.169 281.5)
XYZxyz(6.6614, 3.6064, 25.5392)
Luminance0.0361 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F8D #798D1F
analogous
#1F428D #331F8D #6A1F8D
triadic
#331F8D #8D331F #1F8D33
tetradic
#331F8D #8D1F42 #798D1F #1F8D6A
square
#331F8D #8D1F42 #798D1F #1F8D6A
split-complementary
#331F8D #8D6A1F #428D1F
monochromatic
#0F0929 #21145B #331F8D #452ABF #674ED8

Accessibility & contrast

On white

12.20
#331F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#331F8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F8D
12.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F8D#FFFFFF#000000##FFFFFF
##331F8D1.0012.201.7212.20
#FFFFFF12.201.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003990
Deuteranopia (green-blind)
#00318B
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331f8d;
/* rgb */ color: rgb(51, 31, 141);
/* oklch */ color: oklch(34.9% 0.169 281.5);
Tailwind
colors: {
  custom: {
    50: '#775eaf',
    500: '#331f8d',
    950: '#000000',
  },
}
SCSS
$custom: #331f8d;
$custom-light: #775eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#331f8d",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 141
  },
  "hsl": {
    "h": 250.909,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34854,
    "c": 0.16856,
    "h": 281.5
  },
  "luminance": 0.03607
}

Semantic roles & 50–950 ramp

primary
#331F8D
secondary
#A7BB4D
accent
#E741C9
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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