#331B88#331B88

#331B88 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.8% C 0.166 H 283.0°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).

Color values

HEX#331B88
RGBrgb(51, 27, 136)
HSLhsl(253, 67%, 32%)
HSVhsv(253, 80%, 53%)
CMYKcmyk(62.5%, 80.1%, 0%, 46.7%)
CIE-LABlab(21.07, 41.47, -56.20)
CIE-LCHlch(21.07, 69.84, 306.42°)
OKLaboklab(33.82% 0.0375 -0.1621)
OKLCHoklch(33.82% 0.166 283)
XYZxyz(6.1997, 3.2648, 23.5913)
Luminance0.0326 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B88 #70881B
analogous
#1B3A88 #331B88 #6A1B88
triadic
#331B88 #88331B #1B8833
tetradic
#331B88 #881B3A #70881B #1B886A
square
#331B88 #881B3A #70881B #1B886A
split-complementary
#331B88 #886A1B #3A881B
monochromatic
#0D0722 #201155 #331B88 #4625BB #6544DA

Accessibility & contrast

On white

12.70
#331B88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#331B88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B88
12.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B88#FFFFFF#000000##FFFFFF
##331B881.0012.701.6512.70
#FFFFFF12.701.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368B
Deuteranopia (green-blind)
#002F86
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331b88;
/* rgb */ color: rgb(51, 27, 136);
/* oklch */ color: oklch(33.8% 0.166 283.0);
Tailwind
colors: {
  custom: {
    50: '#765bac',
    500: '#331b88',
    950: '#000000',
  },
}
SCSS
$custom: #331b88;
$custom-light: #765bac;
$custom-dark: #000000;
JSON
{
  "hex": "#331b88",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 136
  },
  "hsl": {
    "h": 253.211,
    "s": 66.871,
    "l": 31.961
  },
  "oklch": {
    "l": 0.3382,
    "c": 0.16635,
    "h": 283
  },
  "luminance": 0.03265
}

Semantic roles & 50–950 ramp

primary
#331B88
secondary
#A1BB44
accent
#EA3EC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331B88

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

Preview Lab → · Contrast checker → · Palette generator →

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