#331578#331578

#331578 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.153 H 287.8°. Best body text is #FFFFFF at 13.82:1 contrast (WCAG AA passes).

Color values

HEX#331578
RGBrgb(51, 21, 120)
HSLhsl(258, 70%, 28%)
HSVhsv(258, 83%, 47%)
CMYKcmyk(57.5%, 82.5%, 0%, 52.9%)
CIE-LABlab(18.35, 39.58, -50.55)
CIE-LCHlch(18.35, 64.20, 308.06°)
OKLaboklab(31.41% 0.0468 -0.1455)
OKLCHoklch(31.41% 0.153 287.8)
XYZxyz(5.0226, 2.5959, 18.0021)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331578 #5A7815
analogous
#152878 #331578 #651578
triadic
#331578 #783315 #157833
tetradic
#331578 #781528 #5A7815 #157865
square
#331578 #781528 #5A7815 #157865
split-complementary
#331578 #786515 #287815
monochromatic
#0B051A #1D0C44 #331578 #491EAC #622DDA

Accessibility & contrast

On white

13.82
#331578 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331578 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331578
13.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331578#FFFFFF#000000##FFFFFF
##3315781.0013.821.5213.82
#FFFFFF13.821.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002A76
Tritanopia (blue-blind)
#153247
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331578;
/* rgb */ color: rgb(51, 21, 120);
/* oklch */ color: oklch(31.4% 0.153 287.8);
Tailwind
colors: {
  custom: {
    50: '#7457a0',
    500: '#331578',
    950: '#000000',
  },
}
SCSS
$custom: #331578;
$custom-light: #7457a0;
$custom-dark: #000000;
JSON
{
  "hex": "#331578",
  "rgb": {
    "r": 51,
    "g": 21,
    "b": 120
  },
  "hsl": {
    "h": 258.182,
    "s": 70.213,
    "l": 27.647
  },
  "oklch": {
    "l": 0.31409,
    "c": 0.15282,
    "h": 287.8
  },
  "luminance": 0.02596
}

Semantic roles & 50–950 ramp

primary
#331578
secondary
#8BAE3B
accent
#ED3BB7
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #331578

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

Preview Lab → · Contrast checker → · Palette generator →

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