#331F76#331F76

#331F76 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.5% C 0.139 H 286.3°. Best body text is #FFFFFF at 13.14:1 contrast (WCAG AA passes).

Color values

HEX#331F76
RGBrgb(51, 31, 118)
HSLhsl(254, 58%, 29%)
HSVhsv(254, 74%, 46%)
CMYKcmyk(56.8%, 73.7%, 0%, 53.7%)
CIE-LABlab(20.01, 33.67, -46.54)
CIE-LCHlch(20.01, 57.44, 305.89°)
OKLaboklab(32.52% 0.0392 -0.1338)
OKLCHoklch(32.52% 0.139 286.3)
XYZxyz(5.1243, 2.9915, 17.4434)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F76 #62761F
analogous
#1F3776 #331F76 #5F1F76
triadic
#331F76 #76331F #1F7633
tetradic
#331F76 #761F37 #62761F #1F765F
square
#331F76 #761F37 #62761F #1F765F
split-complementary
#331F76 #765F1F #37761F
monochromatic
#0A0618 #1E1246 #331F76 #482CA6 #6242CD

Accessibility & contrast

On white

13.14
#331F76 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331F76 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F76
13.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F76#FFFFFF#000000##FFFFFF
##331F761.0013.141.6013.14
#FFFFFF13.141.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003379
Deuteranopia (green-blind)
#002E74
Tritanopia (blue-blind)
#163648
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331f76;
/* rgb */ color: rgb(51, 31, 118);
/* oklch */ color: oklch(32.5% 0.139 286.3);
Tailwind
colors: {
  custom: {
    50: '#735d9e',
    500: '#331f76',
    950: '#000000',
  },
}
SCSS
$custom: #331f76;
$custom-light: #735d9e;
$custom-dark: #000000;
JSON
{
  "hex": "#331f76",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 118
  },
  "hsl": {
    "h": 253.793,
    "s": 58.389,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32516,
    "c": 0.13943,
    "h": 286.3
  },
  "luminance": 0.02992
}

Semantic roles & 50–950 ramp

primary
#331F76
secondary
#93AA47
accent
#E246BE
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331F76

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

Preview Lab → · Contrast checker → · Palette generator →

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