#331888#331888

#331888 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.169 H 283.5°. Best body text is #FFFFFF at 12.91:1 contrast (WCAG AA passes).

Color values

HEX#331888
RGBrgb(51, 24, 136)
HSLhsl(254, 70%, 31%)
HSVhsv(254, 82%, 53%)
CMYKcmyk(62.5%, 82.4%, 0%, 46.7%)
CIE-LABlab(20.57, 42.92, -57.03)
CIE-LCHlch(20.57, 71.37, 306.96°)
OKLaboklab(33.47% 0.0394 -0.1644)
OKLCHoklch(33.47% 0.169 283.5)
XYZxyz(6.1344, 3.1342, 23.5695)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331888 #6D8818
analogous
#183588 #331888 #6B1888
triadic
#331888 #883318 #188833
tetradic
#331888 #881835 #6D8818 #18886B
square
#331888 #881835 #6D8818 #18886B
split-complementary
#331888 #886B18 #358818
monochromatic
#0C0620 #1F0F54 #331888 #4721BC #643EDD

Accessibility & contrast

On white

12.91
#331888 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#331888 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331888
12.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331888#FFFFFF#000000##FFFFFF
##3318881.0012.911.6312.91
#FFFFFF12.911.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358B
Deuteranopia (green-blind)
#002E86
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331888;
/* rgb */ color: rgb(51, 24, 136);
/* oklch */ color: oklch(33.5% 0.169 283.5);
Tailwind
colors: {
  custom: {
    50: '#775aac',
    500: '#331888',
    950: '#000000',
  },
}
SCSS
$custom: #331888;
$custom-light: #775aac;
$custom-dark: #000000;
JSON
{
  "hex": "#331888",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 136
  },
  "hsl": {
    "h": 254.464,
    "s": 70,
    "l": 31.373
  },
  "oklch": {
    "l": 0.33472,
    "c": 0.16908,
    "h": 283.5
  },
  "luminance": 0.03135
}

Semantic roles & 50–950 ramp

primary
#331888
secondary
#9EBC40
accent
#ED3BC2
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331888

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

Preview Lab → · Contrast checker → · Palette generator →

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