#331B42#331B42

#331B42 is a dark, moderate violet. Relative luminance 0.019; OKLCH L 27.4% C 0.075 H 310.8°. Best body text is #FFFFFF at 15.26:1 contrast (WCAG AA passes).

Color values

HEX#331B42
RGBrgb(51, 27, 66)
HSLhsl(277, 42%, 18%)
HSVhsv(277, 59%, 26%)
CMYKcmyk(22.7%, 59.1%, 0%, 74.1%)
CIE-LABlab(14.85, 20.34, -20.16)
CIE-LCHlch(14.85, 28.64, 315.25°)
OKLaboklab(27.45% 0.0487 -0.0564)
OKLCHoklch(27.45% 0.075 310.8)
XYZxyz(2.7404, 1.8811, 5.3719)
Luminance0.0188 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B42 #2A421B
analogous
#1F1B42 #331B42 #421B3D
triadic
#331B42 #42331B #1B4233
tetradic
#331B42 #421F1B #2A421B #1B3D42
square
#331B42 #421F1B #2A421B #1B3D42
split-complementary
#331B42 #3D421B #1B421F
monochromatic
#110916 #110917 #331B42 #552D6D #763F99

Accessibility & contrast

On white

15.26
#331B42 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#331B42 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B42
15.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B42#FFFFFF#000000##FFFFFF
##331B421.0015.261.3815.26
#FFFFFF15.261.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#112443
Deuteranopia (green-blind)
#182641
Tritanopia (blue-blind)
#31222B
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331b42;
/* rgb */ color: rgb(51, 27, 66);
/* oklch */ color: oklch(27.4% 0.075 310.8);
Tailwind
colors: {
  custom: {
    50: '#6c5876',
    500: '#331b42',
    950: '#000000',
  },
}
SCSS
$custom: #331b42;
$custom-light: #6c5876;
$custom-dark: #000000;
JSON
{
  "hex": "#331b42",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 66
  },
  "hsl": {
    "h": 276.923,
    "s": 41.935,
    "l": 18.235
  },
  "oklch": {
    "l": 0.27445,
    "c": 0.07454,
    "h": 310.8
  },
  "luminance": 0.01881
}

Semantic roles & 50–950 ramp

primary
#331B42
secondary
#567841
accent
#D25686
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331B42

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

Preview Lab → · Contrast checker → · Palette generator →

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