#331978#331978

#331978 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.149 H 287.1°. Best body text is #FFFFFF at 13.54:1 contrast (WCAG AA passes).

Color values

HEX#331978
RGBrgb(51, 25, 120)
HSLhsl(256, 66%, 28%)
HSVhsv(256, 79%, 47%)
CMYKcmyk(57.5%, 79.2%, 0%, 52.9%)
CIE-LABlab(19.03, 37.60, -49.42)
CIE-LCHlch(19.03, 62.10, 307.27°)
OKLaboklab(31.89% 0.0438 -0.1422)
OKLCHoklch(31.89% 0.149 287.1)
XYZxyz(5.1020, 2.7549, 18.0286)
Luminance0.0276 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331978 #5E7819
analogous
#192E78 #331978 #621978
triadic
#331978 #783319 #197833
tetradic
#331978 #78192E #5E7819 #197862
square
#331978 #78192E #5E7819 #197862
split-complementary
#331978 #786219 #2E7819
monochromatic
#0B0519 #1D0E45 #331978 #4924AB #6236D5

Accessibility & contrast

On white

13.54
#331978 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#331978 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331978
13.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331978#FFFFFF#000000##FFFFFF
##3319781.0013.541.5513.54
#FFFFFF13.541.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.541.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331978;
/* rgb */ color: rgb(51, 25, 120);
/* oklch */ color: oklch(31.9% 0.149 287.1);
Tailwind
colors: {
  custom: {
    50: '#7459a0',
    500: '#331978',
    950: '#000000',
  },
}
SCSS
$custom: #331978;
$custom-light: #7459a0;
$custom-dark: #000000;
JSON
{
  "hex": "#331978",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 120
  },
  "hsl": {
    "h": 256.421,
    "s": 65.517,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31888,
    "c": 0.14882,
    "h": 287.1
  },
  "luminance": 0.02755
}

Semantic roles & 50–950 ramp

primary
#331978
secondary
#8FAD40
accent
#E83FBA
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331978

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

Preview Lab → · Contrast checker → · Palette generator →

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