#331B4F#331B4F

#331B4F is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.4% C 0.093 H 302.1°. Best body text is #FFFFFF at 14.89:1 contrast (WCAG AA passes).

Color values

HEX#331B4F
RGBrgb(51, 27, 79)
HSLhsl(268, 49%, 21%)
HSVhsv(268, 66%, 31%)
CMYKcmyk(35.4%, 65.8%, 0%, 69%)
CIE-LABlab(15.76, 24.02, -27.68)
CIE-LCHlch(15.76, 36.65, 310.95°)
OKLaboklab(28.41% 0.0492 -0.0784)
OKLCHoklch(28.41% 0.093 302.1)
XYZxyz(3.1681, 2.0522, 7.6248)
Luminance0.0205 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B4F #374F1B
analogous
#1B1D4F #331B4F #4D1B4F
triadic
#331B4F #4F331B #1B4F33
tetradic
#331B4F #4F1B1D #374F1B #1B4F4D
square
#331B4F #4F1B1D #374F1B #1B4F4D
split-complementary
#331B4F #4F4D1B #1D4F1B
monochromatic
#0F0817 #160B21 #331B4F #502B7D #6E3AAA

Accessibility & contrast

On white

14.89
#331B4F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.41
#331B4F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B4F
14.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B4F#FFFFFF#000000##FFFFFF
##331B4F1.0014.891.4114.89
#FFFFFF14.891.0021.001.00
#0000001.4121.001.0021.00
##FFFFFF14.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#022751
Deuteranopia (green-blind)
#0C274E
Tritanopia (blue-blind)
#2D2632
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #331b4f;
/* rgb */ color: rgb(51, 27, 79);
/* oklch */ color: oklch(28.4% 0.093 302.1);
Tailwind
colors: {
  custom: {
    50: '#6d5881',
    500: '#331b4f',
    950: '#000000',
  },
}
SCSS
$custom: #331b4f;
$custom-light: #6d5881;
$custom-dark: #000000;
JSON
{
  "hex": "#331b4f",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 79
  },
  "hsl": {
    "h": 267.692,
    "s": 49.057,
    "l": 20.784
  },
  "oklch": {
    "l": 0.28405,
    "c": 0.09257,
    "h": 302.1
  },
  "luminance": 0.02052
}

Semantic roles & 50–950 ramp

primary
#331B4F
secondary
#668541
accent
#D94F99
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331B4F

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

Preview Lab → · Contrast checker → · Palette generator →

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