#331B78#331B78

#331B78 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.1% C 0.147 H 286.7°. Best body text is #FFFFFF at 13.39:1 contrast (WCAG AA passes).

Color values

HEX#331B78
RGBrgb(51, 27, 120)
HSLhsl(255, 63%, 29%)
HSVhsv(255, 78%, 47%)
CMYKcmyk(57.5%, 77.5%, 0%, 52.9%)
CIE-LABlab(19.41, 36.55, -48.81)
CIE-LCHlch(19.41, 60.97, 306.82°)
OKLaboklab(32.15% 0.0422 -0.1405)
OKLCHoklch(32.15% 0.147 286.7)
XYZxyz(5.1463, 2.8435, 18.0433)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B78 #60781B
analogous
#1B3278 #331B78 #621B78
triadic
#331B78 #78331B #1B7833
tetradic
#331B78 #781B32 #60781B #1B7862
square
#331B78 #781B32 #60781B #1B7862
split-complementary
#331B78 #78621B #32781B
monochromatic
#0B0619 #1E1046 #331B78 #4826AA #623BD3

Accessibility & contrast

On white

13.39
#331B78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#331B78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B78
13.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B78#FFFFFF#000000##FFFFFF
##331B781.0013.391.5713.39
#FFFFFF13.391.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317B
Deuteranopia (green-blind)
#002C76
Tritanopia (blue-blind)
#143548
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #331b78;
/* rgb */ color: rgb(51, 27, 120);
/* oklch */ color: oklch(32.1% 0.147 286.7);
Tailwind
colors: {
  custom: {
    50: '#735aa0',
    500: '#331b78',
    950: '#000000',
  },
}
SCSS
$custom: #331b78;
$custom-light: #735aa0;
$custom-dark: #000000;
JSON
{
  "hex": "#331b78",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 120
  },
  "hsl": {
    "h": 255.484,
    "s": 63.265,
    "l": 28.824
  },
  "oklch": {
    "l": 0.32149,
    "c": 0.14666,
    "h": 286.7
  },
  "luminance": 0.02844
}

Semantic roles & 50–950 ramp

primary
#331B78
secondary
#91AC43
accent
#E641BC
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #331B78

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

Preview Lab → · Contrast checker → · Palette generator →

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