#331D74#331D74

#331D74 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.0% C 0.139 H 287.3°. Best body text is #FFFFFF at 13.39:1 contrast (WCAG AA passes).

Color values

HEX#331D74
RGBrgb(51, 29, 116)
HSLhsl(255, 60%, 28%)
HSVhsv(255, 75%, 45%)
CMYKcmyk(56%, 75%, 0%, 54.5%)
CIE-LABlab(19.40, 34.19, -46.24)
CIE-LCHlch(19.40, 57.51, 306.48°)
OKLaboklab(32.03% 0.0415 -0.133)
OKLCHoklch(32.03% 0.139 287.3)
XYZxyz(4.9561, 2.8432, 16.8073)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D74 #5E741D
analogous
#1D3274 #331D74 #5E1D74
triadic
#331D74 #74331D #1D7433
tetradic
#331D74 #741D32 #5E741D #1D745E
square
#331D74 #741D32 #5E741D #1D745E
split-complementary
#331D74 #745E1D #32741D
monochromatic
#0B0618 #1D1143 #331D74 #4929A5 #623DCE

Accessibility & contrast

On white

13.39
#331D74 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#331D74 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D74
13.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D74#FFFFFF#000000##FFFFFF
##331D741.0013.391.5713.39
#FFFFFF13.391.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003177
Deuteranopia (green-blind)
#002D72
Tritanopia (blue-blind)
#183446
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331d74;
/* rgb */ color: rgb(51, 29, 116);
/* oklch */ color: oklch(32.0% 0.139 287.3);
Tailwind
colors: {
  custom: {
    50: '#725b9d',
    500: '#331d74',
    950: '#000000',
  },
}
SCSS
$custom: #331d74;
$custom-light: #725b9d;
$custom-dark: #000000;
JSON
{
  "hex": "#331d74",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 116
  },
  "hsl": {
    "h": 255.172,
    "s": 60,
    "l": 28.431
  },
  "oklch": {
    "l": 0.32028,
    "c": 0.13926,
    "h": 287.3
  },
  "luminance": 0.02843
}

Semantic roles & 50–950 ramp

primary
#331D74
secondary
#8FA845
accent
#E345BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331D74

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

Preview Lab → · Contrast checker → · Palette generator →

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