#331988#331988

#331988 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.168 H 283.3°. Best body text is #FFFFFF at 12.84:1 contrast (WCAG AA passes).

Color values

HEX#331988
RGBrgb(51, 25, 136)
HSLhsl(254, 69%, 32%)
HSVhsv(254, 82%, 53%)
CMYKcmyk(62.5%, 81.6%, 0%, 46.7%)
CIE-LABlab(20.74, 42.44, -56.76)
CIE-LCHlch(20.74, 70.87, 306.79°)
OKLaboklab(33.59% 0.0388 -0.1637)
OKLCHoklch(33.59% 0.168 283.3)
XYZxyz(6.1554, 3.1762, 23.5765)
Luminance0.0318 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331988 #6E8819
analogous
#193788 #331988 #6B1988
triadic
#331988 #883319 #198833
tetradic
#331988 #881937 #6E8819 #19886B
square
#331988 #881937 #6E8819 #19886B
split-complementary
#331988 #886B19 #378819
monochromatic
#0C0621 #200F54 #331988 #4623BC #6440DC

Accessibility & contrast

On white

12.84
#331988 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331988 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331988
12.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331988#FFFFFF#000000##FFFFFF
##3319881.0012.841.6412.84
#FFFFFF12.841.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.841.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: #331988;
/* rgb */ color: rgb(51, 25, 136);
/* oklch */ color: oklch(33.6% 0.168 283.3);
Tailwind
colors: {
  custom: {
    50: '#775aac',
    500: '#331988',
    950: '#000000',
  },
}
SCSS
$custom: #331988;
$custom-light: #775aac;
$custom-dark: #000000;
JSON
{
  "hex": "#331988",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 136
  },
  "hsl": {
    "h": 254.054,
    "s": 68.944,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33585,
    "c": 0.16819,
    "h": 283.3
  },
  "luminance": 0.03177
}

Semantic roles & 50–950 ramp

primary
#331988
secondary
#9FBB41
accent
#EC3CC3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331988

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

Preview Lab → · Contrast checker → · Palette generator →

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