#331D66#331D66

#331D66 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.7% C 0.121 H 291.5°. Best body text is #FFFFFF at 13.92:1 contrast (WCAG AA passes).

Color values

HEX#331D66
RGBrgb(51, 29, 102)
HSLhsl(258, 56%, 26%)
HSVhsv(258, 72%, 40%)
CMYKcmyk(50%, 71.6%, 0%, 60%)
CIE-LABlab(18.11, 29.79, -39.27)
CIE-LCHlch(18.11, 49.29, 307.19°)
OKLaboklab(30.7% 0.0443 -0.1125)
OKLCHoklch(30.7% 0.121 291.5)
XYZxyz(4.2022, 2.5417, 12.8370)
Luminance0.0254 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D66 #50661D
analogous
#1D2B66 #331D66 #571D66
triadic
#331D66 #66331D #1D6633
tetradic
#331D66 #661D2B #50661D #1D6657
square
#331D66 #661D2B #50661D #1D6657
split-complementary
#331D66 #66571D #2B661D
monochromatic
#0C0718 #1B0F36 #331D66 #4B2B96 #6338C5

Accessibility & contrast

On white

13.92
#331D66 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.51
#331D66 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D66
13.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D66#FFFFFF#000000##FFFFFF
##331D661.0013.921.5113.92
#FFFFFF13.921.0021.001.00
#0000001.5121.001.0021.00
##FFFFFF13.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D68
Deuteranopia (green-blind)
#002B65
Tritanopia (blue-blind)
#232F3F
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #331d66;
/* rgb */ color: rgb(51, 29, 102);
/* oklch */ color: oklch(30.7% 0.121 291.5);
Tailwind
colors: {
  custom: {
    50: '#705b92',
    500: '#331d66',
    950: '#000000',
  },
}
SCSS
$custom: #331d66;
$custom-light: #705b92;
$custom-dark: #000000;
JSON
{
  "hex": "#331d66",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 102
  },
  "hsl": {
    "h": 258.082,
    "s": 55.725,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30699,
    "c": 0.12087,
    "h": 291.5
  },
  "luminance": 0.02542
}

Semantic roles & 50–950 ramp

primary
#331D66
secondary
#819B44
accent
#DF49B2
background
#F7F5F9
surface
#EDE9F1
border
#C8C5CB
text
#08040D
muted
#7B797E

Preview Lab

Preview with #331D66

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

Preview Lab → · Contrast checker → · Palette generator →

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