#331788#331788

#331788 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.170 H 283.6°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#331788
RGBrgb(51, 23, 136)
HSLhsl(255, 71%, 31%)
HSVhsv(255, 83%, 53%)
CMYKcmyk(62.5%, 83.1%, 0%, 46.7%)
CIE-LABlab(20.42, 43.38, -57.29)
CIE-LCHlch(20.42, 71.86, 307.13°)
OKLaboklab(33.36% 0.04 -0.1652)
OKLCHoklch(33.36% 0.17 283.6)
XYZxyz(6.1142, 3.0938, 23.5627)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331788 #6C8817
analogous
#173388 #331788 #6B1788
triadic
#331788 #883317 #178833
tetradic
#331788 #881733 #6C8817 #17886B
square
#331788 #881733 #6C8817 #17886B
split-complementary
#331788 #886B17 #338817
monochromatic
#0C051F #1F0E54 #331788 #4720BC #643BDE

Accessibility & contrast

On white

12.97
#331788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331788 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331788
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331788#FFFFFF#000000##FFFFFF
##3317881.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348B
Deuteranopia (green-blind)
#002D86
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331788;
/* rgb */ color: rgb(51, 23, 136);
/* oklch */ color: oklch(33.4% 0.170 283.6);
Tailwind
colors: {
  custom: {
    50: '#7759ac',
    500: '#331788',
    950: '#000000',
  },
}
SCSS
$custom: #331788;
$custom-light: #7759ac;
$custom-dark: #000000;
JSON
{
  "hex": "#331788",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 254.867,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33363,
    "c": 0.16995,
    "h": 283.6
  },
  "luminance": 0.03094
}

Semantic roles & 50–950 ramp

primary
#331788
secondary
#9DBC3F
accent
#EE3AC1
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331788

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

Preview Lab → · Contrast checker → · Palette generator →

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