#331684#331684

#331684 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.8% C 0.166 H 284.6°. Best body text is #FFFFFF at 13.22:1 contrast (WCAG AA passes).

Color values

HEX#331684
RGBrgb(51, 22, 132)
HSLhsl(256, 71%, 30%)
HSVhsv(256, 83%, 52%)
CMYKcmyk(61.4%, 83.3%, 0%, 48.2%)
CIE-LABlab(19.82, 42.65, -55.76)
CIE-LCHlch(19.82, 70.21, 307.41°)
OKLaboklab(32.82% 0.042 -0.1607)
OKLCHoklch(32.82% 0.166 284.6)
XYZxyz(5.8157, 2.9432, 22.0870)
Luminance0.0294 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331684 #678416
analogous
#163084 #331684 #6A1684
triadic
#331684 #843316 #168433
tetradic
#331684 #841630 #678416 #16846A
square
#331684 #841630 #678416 #16846A
split-complementary
#331684 #846A16 #308416
monochromatic
#0A051B #1F0D50 #331684 #471FB8 #6337DE

Accessibility & contrast

On white

13.22
#331684 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#331684 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331684
13.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331684#FFFFFF#000000##FFFFFF
##3316841.0013.221.5913.22
#FFFFFF13.221.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003387
Deuteranopia (green-blind)
#002C82
Tritanopia (blue-blind)
#00384E
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331684;
/* rgb */ color: rgb(51, 22, 132);
/* oklch */ color: oklch(32.8% 0.166 284.6);
Tailwind
colors: {
  custom: {
    50: '#7658a9',
    500: '#331684',
    950: '#000000',
  },
}
SCSS
$custom: #331684;
$custom-light: #7658a9;
$custom-dark: #000000;
JSON
{
  "hex": "#331684",
  "rgb": {
    "r": 51,
    "g": 22,
    "b": 132
  },
  "hsl": {
    "h": 255.818,
    "s": 71.429,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32816,
    "c": 0.1661,
    "h": 284.6
  },
  "luminance": 0.02944
}

Semantic roles & 50–950 ramp

primary
#331684
secondary
#98B83D
accent
#EE3ABF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331684

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

Preview Lab → · Contrast checker → · Palette generator →

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