#331B4B#331B4B

#331B4B is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.1% C 0.087 H 304.5°. Best body text is #FFFFFF at 15.01:1 contrast (WCAG AA passes).

Color values

HEX#331B4B
RGBrgb(51, 27, 75)
HSLhsl(270, 47%, 20%)
HSVhsv(270, 64%, 29%)
CMYKcmyk(32%, 64%, 0%, 70.6%)
CIE-LABlab(15.46, 22.86, -25.41)
CIE-LCHlch(15.46, 34.18, 311.97°)
OKLaboklab(28.1% 0.0492 -0.0718)
OKLCHoklch(28.1% 0.087 304.5)
XYZxyz(3.0269, 1.9957, 6.8810)
Luminance0.0200 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B4B #334B1B
analogous
#1B1B4B #331B4B #4B1B4B
triadic
#331B4B #4B331B #1B4B33
tetradic
#331B4B #4B1B1B #334B1B #1B4B4B
square
#331B4B #4B1B1B #334B1B #1B4B4B
split-complementary
#331B4B #4B4B1B #1B4B1B
monochromatic
#0F0817 #140B1E #331B4B #522B78 #703BA5

Accessibility & contrast

On white

15.01
#331B4B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331B4B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B4B
15.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B4B#FFFFFF#000000##FFFFFF
##331B4B1.0015.011.4015.01
#FFFFFF15.011.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF15.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#07264D
Deuteranopia (green-blind)
#11274A
Tritanopia (blue-blind)
#2F2430
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331b4b;
/* rgb */ color: rgb(51, 27, 75);
/* oklch */ color: oklch(28.1% 0.087 304.5);
Tailwind
colors: {
  custom: {
    50: '#6d587d',
    500: '#331b4b',
    950: '#000000',
  },
}
SCSS
$custom: #331b4b;
$custom-light: #6d587d;
$custom-dark: #000000;
JSON
{
  "hex": "#331b4b",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 75
  },
  "hsl": {
    "h": 270,
    "s": 47.059,
    "l": 20
  },
  "oklch": {
    "l": 0.28095,
    "c": 0.08702,
    "h": 304.5
  },
  "luminance": 0.01996
}

Semantic roles & 50–950 ramp

primary
#331B4B
secondary
#618141
accent
#D75194
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331B4B

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

Preview Lab → · Contrast checker → · Palette generator →

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