#331B56#331B56

#331B56 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.0% C 0.102 H 298.5°. Best body text is #FFFFFF at 14.66:1 contrast (WCAG AA passes).

Color values

HEX#331B56
RGBrgb(51, 27, 86)
HSLhsl(264, 52%, 22%)
HSVhsv(264, 69%, 34%)
CMYKcmyk(40.7%, 68.6%, 0%, 66.3%)
CIE-LABlab(16.30, 26.10, -31.55)
CIE-LCHlch(16.30, 40.94, 309.60°)
OKLaboklab(28.97% 0.0488 -0.0898)
OKLCHoklch(28.97% 0.102 298.5)
XYZxyz(3.4365, 2.1595, 9.0381)
Luminance0.0216 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B56 #3E561B
analogous
#1B2156 #331B56 #511B56
triadic
#331B56 #56331B #1B5633
tetradic
#331B56 #561B21 #3E561B #1B5651
square
#331B56 #561B21 #3E561B #1B5651
split-complementary
#331B56 #56511B #21561B
monochromatic
#0E0717 #170C27 #331B56 #4F2A85 #6A38B3

Accessibility & contrast

On white

14.66
#331B56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331B56 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B56
14.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B56#FFFFFF#000000##FFFFFF
##331B561.0014.661.4314.66
#FFFFFF14.661.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002858
Deuteranopia (green-blind)
#012855
Tritanopia (blue-blind)
#2B2835
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331b56;
/* rgb */ color: rgb(51, 27, 86);
/* oklch */ color: oklch(29.0% 0.102 298.5);
Tailwind
colors: {
  custom: {
    50: '#6e5986',
    500: '#331b56',
    950: '#000000',
  },
}
SCSS
$custom: #331b56;
$custom-light: #6e5986;
$custom-dark: #000000;
JSON
{
  "hex": "#331b56",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 86
  },
  "hsl": {
    "h": 264.407,
    "s": 52.212,
    "l": 22.157
  },
  "oklch": {
    "l": 0.28974,
    "c": 0.10218,
    "h": 298.5
  },
  "luminance": 0.0216
}

Semantic roles & 50–950 ramp

primary
#331B56
secondary
#6D8C41
accent
#DC4CA1
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331B56

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

Preview Lab → · Contrast checker → · Palette generator →

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