#331E56#331E56

#331E56 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.5% C 0.097 H 297.4°. Best body text is #FFFFFF at 14.38:1 contrast (WCAG AA passes).

Color values

HEX#331E56
RGBrgb(51, 30, 86)
HSLhsl(263, 48%, 23%)
HSVhsv(263, 65%, 34%)
CMYKcmyk(40.7%, 65.1%, 0%, 66.3%)
CIE-LABlab(17.01, 24.21, -30.41)
CIE-LCHlch(17.01, 38.87, 308.52°)
OKLaboklab(29.49% 0.0447 -0.0864)
OKLCHoklch(29.49% 0.097 297.4)
XYZxyz(3.5088, 2.3042, 9.0622)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E56 #41561E
analogous
#1E2556 #331E56 #4F1E56
triadic
#331E56 #56331E #1E5633
tetradic
#331E56 #561E25 #41561E #1E564F
square
#331E56 #561E25 #41561E #1E564F
split-complementary
#331E56 #564F1E #25561E
monochromatic
#0D0817 #180E29 #331E56 #4E2E83 #693EB1

Accessibility & contrast

On white

14.38
#331E56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331E56
14.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E56#FFFFFF#000000##FFFFFF
##331E561.0014.381.4614.38
#FFFFFF14.381.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A58
Deuteranopia (green-blind)
#072955
Tritanopia (blue-blind)
#2B2A36
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331e56;
/* rgb */ color: rgb(51, 30, 86);
/* oklch */ color: oklch(29.5% 0.097 297.4);
Tailwind
colors: {
  custom: {
    50: '#6e5b86',
    500: '#331e56',
    950: '#000000',
  },
}
SCSS
$custom: #331e56;
$custom-light: #6e5b86;
$custom-dark: #000000;
JSON
{
  "hex": "#331e56",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 86
  },
  "hsl": {
    "h": 262.5,
    "s": 48.276,
    "l": 22.745
  },
  "oklch": {
    "l": 0.29487,
    "c": 0.09733,
    "h": 297.4
  },
  "luminance": 0.02304
}

Semantic roles & 50–950 ramp

primary
#331E56
secondary
#718B45
accent
#D850A5
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07040B
muted
#7A797C

Preview Lab

Preview with #331E56

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

Preview Lab → · Contrast checker → · Palette generator →

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