#331F79#331F79

#331F79 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 32.8% C 0.143 H 285.6°. Best body text is #FFFFFF at 13.02:1 contrast (WCAG AA passes).

Color values

HEX#331F79
RGBrgb(51, 31, 121)
HSLhsl(253, 59%, 30%)
HSVhsv(253, 74%, 47%)
CMYKcmyk(57.9%, 74.4%, 0%, 52.5%)
CIE-LABlab(20.30, 34.63, -47.98)
CIE-LCHlch(20.30, 59.17, 305.82°)
OKLaboklab(32.81% 0.0385 -0.1381)
OKLCHoklch(32.81% 0.143 285.6)
XYZxyz(5.3054, 3.0640, 18.3973)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F79 #65791F
analogous
#1F3879 #331F79 #601F79
triadic
#331F79 #79331F #1F7933
tetradic
#331F79 #791F38 #65791F #1F7960
square
#331F79 #791F38 #65791F #1F7960
split-complementary
#331F79 #79601F #38791F
monochromatic
#0A0618 #1E1348 #331F79 #482BAA #6243CF

Accessibility & contrast

On white

13.02
#331F79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#331F79 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F79
13.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F79#FFFFFF#000000##FFFFFF
##331F791.0013.021.6113.02
#FFFFFF13.021.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337C
Deuteranopia (green-blind)
#002E77
Tritanopia (blue-blind)
#13374A
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331f79;
/* rgb */ color: rgb(51, 31, 121);
/* oklch */ color: oklch(32.8% 0.143 285.6);
Tailwind
colors: {
  custom: {
    50: '#735da1',
    500: '#331f79',
    950: '#000000',
  },
}
SCSS
$custom: #331f79;
$custom-light: #735da1;
$custom-dark: #000000;
JSON
{
  "hex": "#331f79",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 121
  },
  "hsl": {
    "h": 253.333,
    "s": 59.211,
    "l": 29.804
  },
  "oklch": {
    "l": 0.3281,
    "c": 0.14334,
    "h": 285.6
  },
  "luminance": 0.03064
}

Semantic roles & 50–950 ramp

primary
#331F79
secondary
#96AC47
accent
#E245C0
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331F79

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

Preview Lab → · Contrast checker → · Palette generator →

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