#331878#331878

#331878 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.150 H 287.3°. Best body text is #FFFFFF at 13.61:1 contrast (WCAG AA passes).

Color values

HEX#331878
RGBrgb(51, 24, 120)
HSLhsl(257, 67%, 28%)
HSVhsv(257, 80%, 47%)
CMYKcmyk(57.5%, 80%, 0%, 52.9%)
CIE-LABlab(18.86, 38.11, -49.71)
CIE-LCHlch(18.86, 62.64, 307.48°)
OKLaboklab(31.76% 0.0446 -0.1431)
OKLCHoklch(31.76% 0.15 287.3)
XYZxyz(5.0810, 2.7129, 18.0216)
Luminance0.0271 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331878 #5D7818
analogous
#182D78 #331878 #631878
triadic
#331878 #783318 #187833
tetradic
#331878 #78182D #5D7818 #187863
square
#331878 #78182D #5D7818 #187863
split-complementary
#331878 #786318 #2D7818
monochromatic
#0B051A #1D0E45 #331878 #4922AB #6234D6

Accessibility & contrast

On white

13.61
#331878 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#331878 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331878
13.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331878#FFFFFF#000000##FFFFFF
##3318781.0013.611.5413.61
#FFFFFF13.611.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307B
Deuteranopia (green-blind)
#002B76
Tritanopia (blue-blind)
#153347
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #331878;
/* rgb */ color: rgb(51, 24, 120);
/* oklch */ color: oklch(31.8% 0.150 287.3);
Tailwind
colors: {
  custom: {
    50: '#7459a0',
    500: '#331878',
    950: '#000000',
  },
}
SCSS
$custom: #331878;
$custom-light: #7459a0;
$custom-dark: #000000;
JSON
{
  "hex": "#331878",
  "rgb": {
    "r": 51,
    "g": 24,
    "b": 120
  },
  "hsl": {
    "h": 256.875,
    "s": 66.667,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31762,
    "c": 0.14986,
    "h": 287.3
  },
  "luminance": 0.02713
}

Semantic roles & 50–950 ramp

primary
#331878
secondary
#8EAD3F
accent
#EA3EB9
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331878

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

Preview Lab → · Contrast checker → · Palette generator →

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