#331784#331784

#331784 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.9% C 0.165 H 284.5°. Best body text is #FFFFFF at 13.15:1 contrast (WCAG AA passes).

Color values

HEX#331784
RGBrgb(51, 23, 132)
HSLhsl(255, 70%, 30%)
HSVhsv(255, 83%, 52%)
CMYKcmyk(61.4%, 82.6%, 0%, 48.2%)
CIE-LABlab(19.97, 42.19, -55.50)
CIE-LCHlch(19.97, 69.72, 307.24°)
OKLaboklab(32.92% 0.0414 -0.16)
OKLCHoklch(32.92% 0.165 284.5)
XYZxyz(5.8352, 2.9822, 22.0935)
Luminance0.0298 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331784 #688417
analogous
#173184 #331784 #691784
triadic
#331784 #843317 #178433
tetradic
#331784 #841731 #688417 #178469
square
#331784 #841731 #688417 #178469
split-complementary
#331784 #846917 #318417
monochromatic
#0B051C #1F0E50 #331784 #4720B8 #6339DC

Accessibility & contrast

On white

13.15
#331784 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#331784 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331784
13.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331784#FFFFFF#000000##FFFFFF
##3317841.0013.151.6013.15
#FFFFFF13.151.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.151.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331784;
/* rgb */ color: rgb(51, 23, 132);
/* oklch */ color: oklch(32.9% 0.165 284.5);
Tailwind
colors: {
  custom: {
    50: '#7659a9',
    500: '#331784',
    950: '#000000',
  },
}
SCSS
$custom: #331784;
$custom-light: #7659a9;
$custom-dark: #000000;
JSON
{
  "hex": "#331784",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 132
  },
  "hsl": {
    "h": 255.413,
    "s": 70.323,
    "l": 30.392
  },
  "oklch": {
    "l": 0.32925,
    "c": 0.16524,
    "h": 284.5
  },
  "luminance": 0.02983
}

Semantic roles & 50–950 ramp

primary
#331784
secondary
#99B83F
accent
#ED3BBF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331784

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

Preview Lab → · Contrast checker → · Palette generator →

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