#331783#331783

#331783 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.8% C 0.164 H 284.7°. Best body text is #FFFFFF at 13.20:1 contrast (WCAG AA passes).

Color values

HEX#331783
RGBrgb(51, 23, 131)
HSLhsl(256, 70%, 30%)
HSVhsv(256, 82%, 51%)
CMYKcmyk(61.1%, 82.4%, 0%, 48.6%)
CIE-LABlab(19.86, 41.90, -55.05)
CIE-LCHlch(19.86, 69.18, 307.27°)
OKLaboklab(32.82% 0.0417 -0.1587)
OKLCHoklch(32.82% 0.164 284.7)
XYZxyz(5.7671, 2.9549, 21.7348)
Luminance0.0295 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331783 #678317
analogous
#173183 #331783 #691783
triadic
#331783 #833317 #178333
tetradic
#331783 #831731 #678317 #178369
square
#331783 #831731 #678317 #178369
split-complementary
#331783 #836917 #318317
monochromatic
#0A051B #1F0E4F #331783 #4720B7 #6338DC

Accessibility & contrast

On white

13.20
#331783 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331783
13.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331783#FFFFFF#000000##FFFFFF
##3317831.0013.201.5913.20
#FFFFFF13.201.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003386
Deuteranopia (green-blind)
#002D81
Tritanopia (blue-blind)
#01384D
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331783;
/* rgb */ color: rgb(51, 23, 131);
/* oklch */ color: oklch(32.8% 0.164 284.7);
Tailwind
colors: {
  custom: {
    50: '#7659a8',
    500: '#331783',
    950: '#000000',
  },
}
SCSS
$custom: #331783;
$custom-light: #7659a8;
$custom-dark: #000000;
JSON
{
  "hex": "#331783",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 131
  },
  "hsl": {
    "h": 255.556,
    "s": 70.13,
    "l": 30.196
  },
  "oklch": {
    "l": 0.32816,
    "c": 0.16405,
    "h": 284.7
  },
  "luminance": 0.02955
}

Semantic roles & 50–950 ramp

primary
#331783
secondary
#98B73F
accent
#ED3BBF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331783

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

Preview Lab → · Contrast checker → · Palette generator →

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