#331156#331156

#331156 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.5% C 0.117 H 301.4°. Best body text is #FFFFFF at 15.49:1 contrast (WCAG AA passes).

Color values

HEX#331156
RGBrgb(51, 17, 86)
HSLhsl(270, 67%, 20%)
HSVhsv(270, 80%, 34%)
CMYKcmyk(40.7%, 80.2%, 0%, 66.3%)
CIE-LABlab(14.27, 31.74, -34.85)
CIE-LCHlch(14.27, 47.14, 312.32°)
OKLaboklab(27.52% 0.0608 -0.0994)
OKLCHoklch(27.52% 0.117 301.4)
XYZxyz(3.2450, 1.7766, 8.9742)
Luminance0.0178 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331156 #345611
analogous
#111256 #331156 #551156
triadic
#331156 #563311 #115633
tetradic
#331156 #561112 #345611 #115655
square
#331156 #561112 #345611 #115655
split-complementary
#331156 #565511 #125611
monochromatic
#0F051A #150723 #331156 #511B89 #7025BC

Accessibility & contrast

On white

15.49
#331156 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#331156 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331156
15.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331156#FFFFFF#000000##FFFFFF
##3311561.0015.491.3615.49
#FFFFFF15.491.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002458
Deuteranopia (green-blind)
#002455
Tritanopia (blue-blind)
#2B2232
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #331156;
/* rgb */ color: rgb(51, 17, 86);
/* oklch */ color: oklch(27.5% 0.117 301.4);
Tailwind
colors: {
  custom: {
    50: '#6f5386',
    500: '#331156',
    950: '#000000',
  },
}
SCSS
$custom: #331156;
$custom-light: #6f5386;
$custom-dark: #000000;
JSON
{
  "hex": "#331156",
  "rgb": {
    "r": 51,
    "g": 17,
    "b": 86
  },
  "hsl": {
    "h": 269.565,
    "s": 66.99,
    "l": 20.196
  },
  "oklch": {
    "l": 0.27519,
    "c": 0.11653,
    "h": 301.4
  },
  "luminance": 0.01777
}

Semantic roles & 50–950 ramp

primary
#331156
secondary
#628F34
accent
#EA3E95
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08020B
muted
#7B787C

Preview Lab

Preview with #331156

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

Preview Lab → · Contrast checker → · Palette generator →

#331156 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva