#331D5A#331D5A

#331D5A is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.6% C 0.105 H 296.0°. Best body text is #FFFFFF at 14.34:1 contrast (WCAG AA passes).

Color values

HEX#331D5A
RGBrgb(51, 29, 90)
HSLhsl(262, 51%, 23%)
HSVhsv(262, 68%, 35%)
CMYKcmyk(43.3%, 67.8%, 0%, 64.7%)
CIE-LABlab(17.09, 26.07, -32.97)
CIE-LCHlch(17.09, 42.03, 308.33°)
OKLaboklab(29.64% 0.0458 -0.094)
OKLCHoklch(29.64% 0.105 296)
XYZxyz(3.6496, 2.3206, 9.9265)
Luminance0.0232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D5A #445A1D
analogous
#1D255A #331D5A #511D5A
triadic
#331D5A #5A331D #1D5A33
tetradic
#331D5A #5A1D25 #445A1D #1D5A51
square
#331D5A #5A1D25 #445A1D #1D5A51
split-complementary
#331D5A #5A511D #255A1D
monochromatic
#0D0717 #190E2C #331D5A #4D2C88 #673BB7

Accessibility & contrast

On white

14.34
#331D5A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#331D5A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D5A
14.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D5A#FFFFFF#000000##FFFFFF
##331D5A1.0014.341.4614.34
#FFFFFF14.341.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A5C
Deuteranopia (green-blind)
#002959
Tritanopia (blue-blind)
#292B38
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331d5a;
/* rgb */ color: rgb(51, 29, 90);
/* oklch */ color: oklch(29.6% 0.105 296.0);
Tailwind
colors: {
  custom: {
    50: '#6e5a89',
    500: '#331d5a',
    950: '#000000',
  },
}
SCSS
$custom: #331d5a;
$custom-light: #6e5a89;
$custom-dark: #000000;
JSON
{
  "hex": "#331d5a",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 90
  },
  "hsl": {
    "h": 261.639,
    "s": 51.261,
    "l": 23.333
  },
  "oklch": {
    "l": 0.29644,
    "c": 0.10452,
    "h": 296
  },
  "luminance": 0.02321
}

Semantic roles & 50–950 ramp

primary
#331D5A
secondary
#748F44
accent
#DB4DA8
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331D5A

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

Preview Lab → · Contrast checker → · Palette generator →

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