#331F7D#331F7D

#331F7D is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.2% C 0.148 H 284.7°. Best body text is #FFFFFF at 12.86:1 contrast (WCAG AA passes).

Color values

HEX#331F7D
RGBrgb(51, 31, 125)
HSLhsl(253, 60%, 31%)
HSVhsv(253, 75%, 49%)
CMYKcmyk(59.2%, 75.2%, 0%, 51%)
CIE-LABlab(20.69, 35.90, -49.89)
CIE-LCHlch(20.69, 61.47, 305.74°)
OKLaboklab(33.21% 0.0376 -0.1436)
OKLCHoklch(33.21% 0.148 284.7)
XYZxyz(5.5558, 3.1641, 19.7160)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F7D #697D1F
analogous
#1F3A7D #331F7D #621F7D
triadic
#331F7D #7D331F #1F7D33
tetradic
#331F7D #7D1F3A #697D1F #1F7D62
square
#331F7D #7D1F3A #697D1F #1F7D62
split-complementary
#331F7D #7D621F #3A7D1F
monochromatic
#0B071B #1F134C #331F7D #472BAE #6345D1

Accessibility & contrast

On white

12.86
#331F7D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331F7D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F7D
12.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F7D#FFFFFF#000000##FFFFFF
##331F7D1.0012.861.6312.86
#FFFFFF12.861.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003480
Deuteranopia (green-blind)
#002F7B
Tritanopia (blue-blind)
#0D394C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331f7d;
/* rgb */ color: rgb(51, 31, 125);
/* oklch */ color: oklch(33.2% 0.148 284.7);
Tailwind
colors: {
  custom: {
    50: '#745da4',
    500: '#331f7d',
    950: '#000000',
  },
}
SCSS
$custom: #331f7d;
$custom-light: #745da4;
$custom-dark: #000000;
JSON
{
  "hex": "#331f7d",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 125
  },
  "hsl": {
    "h": 252.766,
    "s": 60.256,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33207,
    "c": 0.14849,
    "h": 284.7
  },
  "luminance": 0.03164
}

Semantic roles & 50–950 ramp

primary
#331F7D
secondary
#9AB048
accent
#E344C2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F7D

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

Preview Lab → · Contrast checker → · Palette generator →

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