#331F77#331F77

#331F77 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.6% C 0.141 H 286.1°. Best body text is #FFFFFF at 13.10:1 contrast (WCAG AA passes).

Color values

HEX#331F77
RGBrgb(51, 31, 119)
HSLhsl(254, 59%, 29%)
HSVhsv(254, 74%, 47%)
CMYKcmyk(57.1%, 73.9%, 0%, 53.3%)
CIE-LABlab(20.11, 33.99, -47.02)
CIE-LCHlch(20.11, 58.02, 305.86°)
OKLaboklab(32.61% 0.039 -0.1352)
OKLCHoklch(32.61% 0.141 286.1)
XYZxyz(5.1840, 3.0154, 17.7581)
Luminance0.0302 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F77 #63771F
analogous
#1F3777 #331F77 #5F1F77
triadic
#331F77 #77331F #1F7733
tetradic
#331F77 #771F37 #63771F #1F775F
square
#331F77 #771F37 #63771F #1F775F
split-complementary
#331F77 #775F1F #37771F
monochromatic
#0A0618 #1E1246 #331F77 #482CA8 #6243CE

Accessibility & contrast

On white

13.10
#331F77 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F77
13.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F77#FFFFFF#000000##FFFFFF
##331F771.0013.101.6013.10
#FFFFFF13.101.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00337A
Deuteranopia (green-blind)
#002E75
Tritanopia (blue-blind)
#153648
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331f77;
/* rgb */ color: rgb(51, 31, 119);
/* oklch */ color: oklch(32.6% 0.141 286.1);
Tailwind
colors: {
  custom: {
    50: '#735d9f',
    500: '#331f77',
    950: '#000000',
  },
}
SCSS
$custom: #331f77;
$custom-light: #735d9f;
$custom-dark: #000000;
JSON
{
  "hex": "#331f77",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 119
  },
  "hsl": {
    "h": 253.636,
    "s": 58.667,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32614,
    "c": 0.14074,
    "h": 286.1
  },
  "luminance": 0.03016
}

Semantic roles & 50–950 ramp

primary
#331F77
secondary
#94AB47
accent
#E246BE
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331F77

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

Preview Lab → · Contrast checker → · Palette generator →

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