#331D56#331D56

#331D56 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.3% C 0.099 H 297.8°. Best body text is #FFFFFF at 14.47:1 contrast (WCAG AA passes).

Color values

HEX#331D56
RGBrgb(51, 29, 86)
HSLhsl(263, 50%, 23%)
HSVhsv(263, 66%, 34%)
CMYKcmyk(40.7%, 66.3%, 0%, 66.3%)
CIE-LABlab(16.77, 24.84, -30.80)
CIE-LCHlch(16.77, 39.57, 308.89°)
OKLaboklab(29.31% 0.0461 -0.0876)
OKLCHoklch(29.31% 0.099 297.8)
XYZxyz(3.4839, 2.2544, 9.0539)
Luminance0.0225 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D56 #40561D
analogous
#1D2356 #331D56 #4F1D56
triadic
#331D56 #56331D #1D5633
tetradic
#331D56 #561D23 #40561D #1D564F
square
#331D56 #561D23 #40561D #1D564F
split-complementary
#331D56 #564F1D #23561D
monochromatic
#0E0817 #180E28 #331D56 #4E2C84 #693CB2

Accessibility & contrast

On white

14.47
#331D56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#331D56 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D56
14.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D56#FFFFFF#000000##FFFFFF
##331D561.0014.471.4514.47
#FFFFFF14.471.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A58
Deuteranopia (green-blind)
#052955
Tritanopia (blue-blind)
#2B2936
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331d56;
/* rgb */ color: rgb(51, 29, 86);
/* oklch */ color: oklch(29.3% 0.099 297.8);
Tailwind
colors: {
  custom: {
    50: '#6e5a86',
    500: '#331d56',
    950: '#000000',
  },
}
SCSS
$custom: #331d56;
$custom-light: #6e5a86;
$custom-dark: #000000;
JSON
{
  "hex": "#331d56",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 86
  },
  "hsl": {
    "h": 263.158,
    "s": 49.565,
    "l": 22.549
  },
  "oklch": {
    "l": 0.29312,
    "c": 0.09896,
    "h": 297.8
  },
  "luminance": 0.02254
}

Semantic roles & 50–950 ramp

primary
#331D56
secondary
#708B44
accent
#D94FA4
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331D56

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

Preview Lab → · Contrast checker → · Palette generator →

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