#331E4B#331E4B

#331E4B is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.6% C 0.082 H 303.2°. Best body text is #FFFFFF at 14.71:1 contrast (WCAG AA passes).

Color values

HEX#331E4B
RGBrgb(51, 30, 75)
HSLhsl(268, 43%, 21%)
HSVhsv(268, 60%, 29%)
CMYKcmyk(32%, 60%, 0%, 70.6%)
CIE-LABlab(16.21, 20.91, -24.23)
CIE-LCHlch(16.21, 32.00, 310.80°)
OKLaboklab(28.64% 0.0446 -0.0683)
OKLCHoklch(28.64% 0.082 303.2)
XYZxyz(3.0992, 2.1404, 6.9051)
Luminance0.0214 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331E4B #364B1E
analogous
#1E1F4B #331E4B #491E4B
triadic
#331E4B #4B331E #1E4B33
tetradic
#331E4B #4B1E1F #364B1E #1E4B49
square
#331E4B #4B1E1F #364B1E #1E4B49
split-complementary
#331E4B #4B491E #1F4B1E
monochromatic
#0F0916 #150D1F #331E4B #512F77 #6E41A2

Accessibility & contrast

On white

14.71
#331E4B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331E4B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331E4B
14.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331E4B#FFFFFF#000000##FFFFFF
##331E4B1.0014.711.4314.71
#FFFFFF14.711.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E284D
Deuteranopia (green-blind)
#15284A
Tritanopia (blue-blind)
#2F2731
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331e4b;
/* rgb */ color: rgb(51, 30, 75);
/* oklch */ color: oklch(28.6% 0.082 303.2);
Tailwind
colors: {
  custom: {
    50: '#6c5a7d',
    500: '#331e4b',
    950: '#000000',
  },
}
SCSS
$custom: #331e4b;
$custom-light: #6c5a7d;
$custom-dark: #000000;
JSON
{
  "hex": "#331e4b",
  "rgb": {
    "r": 51,
    "g": 30,
    "b": 75
  },
  "hsl": {
    "h": 268,
    "s": 42.857,
    "l": 20.588
  },
  "oklch": {
    "l": 0.28641,
    "c": 0.08158,
    "h": 303.2
  },
  "luminance": 0.0214
}

Semantic roles & 50–950 ramp

primary
#331E4B
secondary
#648045
accent
#D35598
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07040A
muted
#7A797C

Preview Lab

Preview with #331E4B

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

Preview Lab → · Contrast checker → · Palette generator →

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