#331D6E#331D6E

#331D6E is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.4% C 0.131 H 289.0°. Best body text is #FFFFFF at 13.62:1 contrast (WCAG AA passes).

Color values

HEX#331D6E
RGBrgb(51, 29, 110)
HSLhsl(256, 58%, 27%)
HSVhsv(256, 74%, 43%)
CMYKcmyk(53.6%, 73.6%, 0%, 56.9%)
CIE-LABlab(18.83, 32.30, -43.30)
CIE-LCHlch(18.83, 54.02, 306.73°)
OKLaboklab(31.45% 0.0428 -0.1243)
OKLCHoklch(31.45% 0.131 289)
XYZxyz(4.6183, 2.7081, 15.0282)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D6E #586E1D
analogous
#1D306E #331D6E #5B1D6E
triadic
#331D6E #6E331D #1D6E33
tetradic
#331D6E #6E1D30 #586E1D #1D6E5B
square
#331D6E #6E1D30 #586E1D #1D6E5B
split-complementary
#331D6E #6E5B1D #306E1D
monochromatic
#0B0618 #1D103E #331D6E #492A9E #623ACB

Accessibility & contrast

On white

13.62
#331D6E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#331D6E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D6E
13.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D6E#FFFFFF#000000##FFFFFF
##331D6E1.0013.621.5413.62
#FFFFFF13.621.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F70
Deuteranopia (green-blind)
#002C6C
Tritanopia (blue-blind)
#1E3243
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331d6e;
/* rgb */ color: rgb(51, 29, 110);
/* oklch */ color: oklch(31.4% 0.131 289.0);
Tailwind
colors: {
  custom: {
    50: '#715b98',
    500: '#331d6e',
    950: '#000000',
  },
}
SCSS
$custom: #331d6e;
$custom-light: #715b98;
$custom-dark: #000000;
JSON
{
  "hex": "#331d6e",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 110
  },
  "hsl": {
    "h": 256.296,
    "s": 58.273,
    "l": 27.255
  },
  "oklch": {
    "l": 0.31447,
    "c": 0.13147,
    "h": 289
  },
  "luminance": 0.02708
}

Semantic roles & 50–950 ramp

primary
#331D6E
secondary
#89A244
accent
#E146B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #331D6E

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

Preview Lab → · Contrast checker → · Palette generator →

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