#331F74#331F74

#331F74 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.3% C 0.137 H 286.8°. Best body text is #FFFFFF at 13.22:1 contrast (WCAG AA passes).

Color values

HEX#331F74
RGBrgb(51, 31, 116)
HSLhsl(254, 58%, 29%)
HSVhsv(254, 73%, 45%)
CMYKcmyk(56%, 73.3%, 0%, 54.5%)
CIE-LABlab(19.82, 33.03, -45.56)
CIE-LCHlch(19.82, 56.28, 305.94°)
OKLaboklab(32.32% 0.0396 -0.131)
OKLCHoklch(32.32% 0.137 286.8)
XYZxyz(5.0067, 2.9445, 16.8241)
Luminance0.0295 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F74 #60741F
analogous
#1F3674 #331F74 #5E1F74
triadic
#331F74 #74331F #1F7433
tetradic
#331F74 #741F36 #60741F #1F745E
square
#331F74 #741F36 #60741F #1F745E
split-complementary
#331F74 #745E1F #36741F
monochromatic
#0B0618 #1E1244 #331F74 #482CA4 #6241CC

Accessibility & contrast

On white

13.22
#331F74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331F74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F74
13.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F74#FFFFFF#000000##FFFFFF
##331F741.0013.221.5913.22
#FFFFFF13.221.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003277
Deuteranopia (green-blind)
#002D72
Tritanopia (blue-blind)
#183547
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331f74;
/* rgb */ color: rgb(51, 31, 116);
/* oklch */ color: oklch(32.3% 0.137 286.8);
Tailwind
colors: {
  custom: {
    50: '#725c9d',
    500: '#331f74',
    950: '#000000',
  },
}
SCSS
$custom: #331f74;
$custom-light: #725c9d;
$custom-dark: #000000;
JSON
{
  "hex": "#331f74",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 116
  },
  "hsl": {
    "h": 254.118,
    "s": 57.823,
    "l": 28.824
  },
  "oklch": {
    "l": 0.32323,
    "c": 0.13682,
    "h": 286.8
  },
  "luminance": 0.02945
}

Semantic roles & 50–950 ramp

primary
#331F74
secondary
#91A847
accent
#E147BD
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331F74

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

Preview Lab → · Contrast checker → · Palette generator →

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