#331B40#331B40

#331B40 is a dark, moderate violet. Relative luminance 0.019; OKLCH L 27.3% C 0.072 H 312.5°. Best body text is #FFFFFF at 15.31:1 contrast (WCAG AA passes).

Color values

HEX#331B40
RGBrgb(51, 27, 64)
HSLhsl(279, 41%, 18%)
HSVhsv(279, 58%, 25%)
CMYKcmyk(20.3%, 57.8%, 0%, 74.9%)
CIE-LABlab(14.72, 19.80, -18.97)
CIE-LCHlch(14.72, 27.42, 316.23°)
OKLaboklab(27.31% 0.0485 -0.0529)
OKLCHoklch(27.31% 0.072 312.5)
XYZxyz(2.6824, 1.8579, 5.0668)
Luminance0.0186 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B40 #28401B
analogous
#201B40 #331B40 #401B3A
triadic
#331B40 #40331B #1B4033
tetradic
#331B40 #40201B #28401B #1B3A40
square
#331B40 #40201B #28401B #1B3A40
split-complementary
#331B40 #3A401B #1B4020
monochromatic
#110916 #110916 #331B40 #552D6B #783F96

Accessibility & contrast

On white

15.31
#331B40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#331B40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B40
15.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B40#FFFFFF#000000##FFFFFF
##331B401.0015.311.3715.31
#FFFFFF15.311.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#122441
Deuteranopia (green-blind)
#19263F
Tritanopia (blue-blind)
#32212A
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331b40;
/* rgb */ color: rgb(51, 27, 64);
/* oklch */ color: oklch(27.3% 0.072 312.5);
Tailwind
colors: {
  custom: {
    50: '#6c5875',
    500: '#331b40',
    950: '#000000',
  },
}
SCSS
$custom: #331b40;
$custom-light: #6c5875;
$custom-dark: #000000;
JSON
{
  "hex": "#331b40",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 64
  },
  "hsl": {
    "h": 278.919,
    "s": 40.659,
    "l": 17.843
  },
  "oklch": {
    "l": 0.2731,
    "c": 0.07177,
    "h": 312.5
  },
  "luminance": 0.01858
}

Semantic roles & 50–950 ramp

primary
#331B40
secondary
#547541
accent
#D15782
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331B40

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

Preview Lab → · Contrast checker → · Palette generator →

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