#331D71#331D71

#331D71 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.7% C 0.135 H 288.1°. Best body text is #FFFFFF at 13.50:1 contrast (WCAG AA passes).

Color values

HEX#331D71
RGBrgb(51, 29, 113)
HSLhsl(256, 59%, 28%)
HSVhsv(256, 74%, 44%)
CMYKcmyk(54.9%, 74.3%, 0%, 55.7%)
CIE-LABlab(19.12, 33.25, -44.78)
CIE-LCHlch(19.12, 55.77, 306.59°)
OKLaboklab(31.74% 0.0421 -0.1287)
OKLCHoklch(31.74% 0.135 288.1)
XYZxyz(4.7844, 2.7746, 15.9030)
Luminance0.0278 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D71 #5B711D
analogous
#1D3171 #331D71 #5D1D71
triadic
#331D71 #71331D #1D7133
tetradic
#331D71 #711D31 #5B711D #1D715D
square
#331D71 #711D31 #5B711D #1D715D
split-complementary
#331D71 #715D1D #31711D
monochromatic
#0B0618 #1D1140 #331D71 #4929A2 #623CCD

Accessibility & contrast

On white

13.50
#331D71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#331D71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D71
13.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D71#FFFFFF#000000##FFFFFF
##331D711.0013.501.5613.50
#FFFFFF13.501.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003073
Deuteranopia (green-blind)
#002C6F
Tritanopia (blue-blind)
#1B3345
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331d71;
/* rgb */ color: rgb(51, 29, 113);
/* oklch */ color: oklch(31.7% 0.135 288.1);
Tailwind
colors: {
  custom: {
    50: '#725b9b',
    500: '#331d71',
    950: '#000000',
  },
}
SCSS
$custom: #331d71;
$custom-light: #725b9b;
$custom-dark: #000000;
JSON
{
  "hex": "#331d71",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 113
  },
  "hsl": {
    "h": 255.714,
    "s": 59.155,
    "l": 27.843
  },
  "oklch": {
    "l": 0.31735,
    "c": 0.13538,
    "h": 288.1
  },
  "luminance": 0.02775
}

Semantic roles & 50–950 ramp

primary
#331D71
secondary
#8CA544
accent
#E245B9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331D71

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

Preview Lab → · Contrast checker → · Palette generator →

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