#331B5E#331B5E

#331B5E is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.7% C 0.113 H 295.0°. Best body text is #FFFFFF at 14.39:1 contrast (WCAG AA passes).

Color values

HEX#331B5E
RGBrgb(51, 27, 94)
HSLhsl(261, 55%, 24%)
HSVhsv(261, 71%, 37%)
CMYKcmyk(45.7%, 71.3%, 0%, 63.1%)
CIE-LABlab(16.97, 28.52, -35.83)
CIE-LCHlch(16.97, 45.79, 308.52°)
OKLaboklab(29.66% 0.0478 -0.1024)
OKLCHoklch(29.66% 0.113 295)
XYZxyz(3.7770, 2.2957, 10.8316)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B5E #465E1B
analogous
#1B245E #331B5E #541B5E
triadic
#331B5E #5E331B #1B5E33
tetradic
#331B5E #5E1B24 #465E1B #1B5E54
square
#331B5E #5E1B24 #465E1B #1B5E54
split-complementary
#331B5E #5E541B #245E1B
monochromatic
#0D0718 #190D2E #331B5E #4D298E #6736BD

Accessibility & contrast

On white

14.39
#331B5E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B5E
14.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B5E#FFFFFF#000000##FFFFFF
##331B5E1.0014.391.4614.39
#FFFFFF14.391.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A60
Deuteranopia (green-blind)
#00295D
Tritanopia (blue-blind)
#272B3A
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #331b5e;
/* rgb */ color: rgb(51, 27, 94);
/* oklch */ color: oklch(29.7% 0.113 295.0);
Tailwind
colors: {
  custom: {
    50: '#6f598c',
    500: '#331b5e',
    950: '#000000',
  },
}
SCSS
$custom: #331b5e;
$custom-light: #6f598c;
$custom-dark: #000000;
JSON
{
  "hex": "#331b5e",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 94
  },
  "hsl": {
    "h": 261.493,
    "s": 55.372,
    "l": 23.725
  },
  "oklch": {
    "l": 0.29664,
    "c": 0.11298,
    "h": 295
  },
  "luminance": 0.02296
}

Semantic roles & 50–950 ramp

primary
#331B5E
secondary
#769441
accent
#DF49A9
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #331B5E

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

Preview Lab → · Contrast checker → · Palette generator →

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