#331887#331887

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

Color values

HEX#331887
RGBrgb(51, 24, 135)
HSLhsl(255, 70%, 31%)
HSVhsv(255, 82%, 53%)
CMYKcmyk(62.2%, 82.2%, 0%, 47.1%)
CIE-LABlab(20.46, 42.62, -56.58)
CIE-LCHlch(20.46, 70.84, 306.99°)
OKLaboklab(33.36% 0.0397 -0.1631)
OKLCHoklch(33.36% 0.168 283.7)
XYZxyz(6.0637, 3.1059, 23.1969)
Luminance0.0311 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331887 #6C8718
analogous
#183487 #331887 #6A1887
triadic
#331887 #873318 #188733
tetradic
#331887 #871834 #6C8718 #18876A
square
#331887 #871834 #6C8718 #18876A
split-complementary
#331887 #876A18 #348718
monochromatic
#0C061F #1F0F53 #331887 #4721BB #643DDC

Accessibility & contrast

On white

12.95
#331887 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331887
12.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331887#FFFFFF#000000##FFFFFF
##3318871.0012.951.6212.95
#FFFFFF12.951.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358A
Deuteranopia (green-blind)
#002E85
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331887;
/* rgb */ color: rgb(51, 24, 135);
/* oklch */ color: oklch(33.4% 0.168 283.7);
Tailwind
colors: {
  custom: {
    50: '#775aab',
    500: '#331887',
    950: '#000000',
  },
}
SCSS
$custom: #331887;
$custom-light: #775aab;
$custom-dark: #000000;
JSON
{
  "hex": "#331887",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 135
  },
  "hsl": {
    "h": 254.595,
    "s": 69.811,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33363,
    "c": 0.1679,
    "h": 283.7
  },
  "luminance": 0.03106
}

Semantic roles & 50–950 ramp

primary
#331887
secondary
#9DBB40
accent
#ED3BC1
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331887

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

Preview Lab → · Contrast checker → · Palette generator →

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