#331780#331780

#331780 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.5% C 0.160 H 285.4°. Best body text is #FFFFFF at 13.33:1 contrast (WCAG AA passes).

Color values

HEX#331780
RGBrgb(51, 23, 128)
HSLhsl(256, 70%, 30%)
HSVhsv(256, 82%, 50%)
CMYKcmyk(60.2%, 82%, 0%, 49.8%)
CIE-LABlab(19.54, 41.00, -53.69)
CIE-LCHlch(19.54, 67.56, 307.37°)
OKLaboklab(32.49% 0.0427 -0.1547)
OKLCHoklch(32.49% 0.16 285.4)
XYZxyz(5.5667, 2.8748, 20.6794)
Luminance0.0288 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331780 #648017
analogous
#173080 #331780 #681780
triadic
#331780 #803317 #178033
tetradic
#331780 #801730 #648017 #178068
square
#331780 #801730 #648017 #178068
split-complementary
#331780 #806817 #308017
monochromatic
#0A051A #1E0E4C #331780 #4820B4 #6236DB

Accessibility & contrast

On white

13.33
#331780 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331780 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331780
13.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331780#FFFFFF#000000##FFFFFF
##3317801.0013.331.5813.33
#FFFFFF13.331.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003283
Deuteranopia (green-blind)
#002C7E
Tritanopia (blue-blind)
#08364C
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331780;
/* rgb */ color: rgb(51, 23, 128);
/* oklch */ color: oklch(32.5% 0.160 285.4);
Tailwind
colors: {
  custom: {
    50: '#7559a6',
    500: '#331780',
    950: '#000000',
  },
}
SCSS
$custom: #331780;
$custom-light: #7559a6;
$custom-dark: #000000;
JSON
{
  "hex": "#331780",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 128
  },
  "hsl": {
    "h": 256,
    "s": 69.536,
    "l": 29.608
  },
  "oklch": {
    "l": 0.32491,
    "c": 0.16048,
    "h": 285.4
  },
  "luminance": 0.02875
}

Semantic roles & 50–950 ramp

primary
#331780
secondary
#95B43E
accent
#EC3BBD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331780

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

Preview Lab → · Contrast checker → · Palette generator →

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