#331A56#331A56

#331A56 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.8% C 0.104 H 298.9°. Best body text is #FFFFFF at 14.76:1 contrast (WCAG AA passes).

Color values

HEX#331A56
RGBrgb(51, 26, 86)
HSLhsl(265, 54%, 22%)
HSVhsv(265, 70%, 34%)
CMYKcmyk(40.7%, 69.8%, 0%, 66.3%)
CIE-LABlab(16.08, 26.71, -31.92)
CIE-LCHlch(16.08, 41.62, 309.93°)
OKLaboklab(28.81% 0.0501 -0.0908)
OKLCHoklch(28.81% 0.104 298.9)
XYZxyz(3.4139, 2.1144, 9.0306)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A56 #3D561A
analogous
#1A1F56 #331A56 #511A56
triadic
#331A56 #56331A #1A5633
tetradic
#331A56 #561A1F #3D561A #1A5651
square
#331A56 #561A1F #3D561A #1A5651
split-complementary
#331A56 #56511A #1F561A
monochromatic
#0E0717 #170C27 #331A56 #4F2885 #6B36B4

Accessibility & contrast

On white

14.76
#331A56 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331A56 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A56
14.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A56#FFFFFF#000000##FFFFFF
##331A561.0014.761.4214.76
#FFFFFF14.761.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.761.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331a56;
/* rgb */ color: rgb(51, 26, 86);
/* oklch */ color: oklch(28.8% 0.104 298.9);
Tailwind
colors: {
  custom: {
    50: '#6e5886',
    500: '#331a56',
    950: '#000000',
  },
}
SCSS
$custom: #331a56;
$custom-light: #6e5886;
$custom-dark: #000000;
JSON
{
  "hex": "#331a56",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 86
  },
  "hsl": {
    "h": 265,
    "s": 53.571,
    "l": 21.961
  },
  "oklch": {
    "l": 0.2881,
    "c": 0.10374,
    "h": 298.9
  },
  "luminance": 0.02114
}

Semantic roles & 50–950 ramp

primary
#331A56
secondary
#6C8C40
accent
#DD4BA0
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331A56

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

Preview Lab → · Contrast checker → · Palette generator →

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