#331678#331678

#331678 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.152 H 287.7°. Best body text is #FFFFFF at 13.75:1 contrast (WCAG AA passes).

Color values

HEX#331678
RGBrgb(51, 22, 120)
HSLhsl(258, 69%, 28%)
HSVhsv(258, 82%, 47%)
CMYKcmyk(57.5%, 81.7%, 0%, 52.9%)
CIE-LABlab(18.51, 39.11, -50.28)
CIE-LCHlch(18.51, 63.70, 307.87°)
OKLaboklab(31.52% 0.0461 -0.1447)
OKLCHoklch(31.52% 0.152 287.7)
XYZxyz(5.0413, 2.6334, 18.0083)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331678 #5B7816
analogous
#162A78 #331678 #641678
triadic
#331678 #783316 #167833
tetradic
#331678 #78162A #5B7816 #167864
square
#331678 #78162A #5B7816 #167864
split-complementary
#331678 #786416 #2A7816
monochromatic
#0B051A #1D0D44 #331678 #491FAC #622FD9

Accessibility & contrast

On white

13.75
#331678 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331678 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331678
13.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331678#FFFFFF#000000##FFFFFF
##3316781.0013.751.5313.75
#FFFFFF13.751.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.751.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331678;
/* rgb */ color: rgb(51, 22, 120);
/* oklch */ color: oklch(31.5% 0.152 287.7);
Tailwind
colors: {
  custom: {
    50: '#7457a0',
    500: '#331678',
    950: '#000000',
  },
}
SCSS
$custom: #331678;
$custom-light: #7457a0;
$custom-dark: #000000;
JSON
{
  "hex": "#331678",
  "rgb": {
    "r": 51,
    "g": 22,
    "b": 120
  },
  "hsl": {
    "h": 257.755,
    "s": 69.014,
    "l": 27.843
  },
  "oklch": {
    "l": 0.31523,
    "c": 0.15186,
    "h": 287.7
  },
  "luminance": 0.02634
}

Semantic roles & 50–950 ramp

primary
#331678
secondary
#8CAD3C
accent
#EC3CB8
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09030F
muted
#7B787F

Preview Lab

Preview with #331678

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

Preview Lab → · Contrast checker → · Palette generator →

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