#331C80#331C80

#331C80 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.156 H 284.6°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#331C80
RGBrgb(51, 28, 128)
HSLhsl(254, 64%, 31%)
HSVhsv(254, 78%, 50%)
CMYKcmyk(60.2%, 78.1%, 0%, 49.8%)
CIE-LABlab(20.41, 38.49, -52.25)
CIE-LCHlch(20.41, 64.90, 306.38°)
OKLaboklab(33.1% 0.0392 -0.1505)
OKLCHoklch(33.1% 0.156 284.6)
XYZxyz(5.6756, 3.0925, 20.7157)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C80 #69801C
analogous
#1C3780 #331C80 #651C80
triadic
#331C80 #80331C #1C8033
tetradic
#331C80 #801C37 #69801C #1C8065
square
#331C80 #801C37 #69801C #1C8065
split-complementary
#331C80 #80651C #37801C
monochromatic
#0B061C #1F114E #331C80 #4727B2 #6341D5

Accessibility & contrast

On white

12.97
#331C80 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#331C80 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C80
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C80#FFFFFF#000000##FFFFFF
##331C801.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003483
Deuteranopia (green-blind)
#002E7E
Tritanopia (blue-blind)
#07384D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #331c80;
/* rgb */ color: rgb(51, 28, 128);
/* oklch */ color: oklch(33.1% 0.156 284.6);
Tailwind
colors: {
  custom: {
    50: '#755ba6',
    500: '#331c80',
    950: '#000000',
  },
}
SCSS
$custom: #331c80;
$custom-light: #755ba6;
$custom-dark: #000000;
JSON
{
  "hex": "#331c80",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 128
  },
  "hsl": {
    "h": 253.8,
    "s": 64.103,
    "l": 30.588
  },
  "oklch": {
    "l": 0.33102,
    "c": 0.15556,
    "h": 284.6
  },
  "luminance": 0.03093
}

Semantic roles & 50–950 ramp

primary
#331C80
secondary
#9AB344
accent
#E741C1
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #331C80

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

Preview Lab → · Contrast checker → · Palette generator →

#331C80 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva