#331B85#331B85

#331B85 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.163 H 283.7°. Best body text is #FFFFFF at 12.83:1 contrast (WCAG AA passes).

Color values

HEX#331B85
RGBrgb(51, 27, 133)
HSLhsl(254, 66%, 31%)
HSVhsv(254, 80%, 52%)
CMYKcmyk(61.7%, 79.7%, 0%, 47.8%)
CIE-LABlab(20.75, 40.55, -54.85)
CIE-LCHlch(20.75, 68.21, 306.48°)
OKLaboklab(33.5% 0.0385 -0.1581)
OKLCHoklch(33.5% 0.163 283.7)
XYZxyz(5.9895, 3.1807, 22.4841)
Luminance0.0318 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B85 #6D851B
analogous
#1B3885 #331B85 #681B85
triadic
#331B85 #85331B #1B8533
tetradic
#331B85 #851B38 #6D851B #1B8568
square
#331B85 #851B38 #6D851B #1B8568
split-complementary
#331B85 #85681B #38851B
monochromatic
#0C061F #1F1152 #331B85 #4725B8 #6442D9

Accessibility & contrast

On white

12.83
#331B85 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#331B85 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B85
12.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B85#FFFFFF#000000##FFFFFF
##331B851.0012.831.6412.83
#FFFFFF12.831.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003588
Deuteranopia (green-blind)
#002E83
Tritanopia (blue-blind)
#003A4F
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #331b85;
/* rgb */ color: rgb(51, 27, 133);
/* oklch */ color: oklch(33.5% 0.163 283.7);
Tailwind
colors: {
  custom: {
    50: '#765baa',
    500: '#331b85',
    950: '#000000',
  },
}
SCSS
$custom: #331b85;
$custom-light: #765baa;
$custom-dark: #000000;
JSON
{
  "hex": "#331b85",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 133
  },
  "hsl": {
    "h": 253.585,
    "s": 66.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.335,
    "c": 0.16271,
    "h": 283.7
  },
  "luminance": 0.03181
}

Semantic roles & 50–950 ramp

primary
#331B85
secondary
#9EB844
accent
#E93FC3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331B85

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

Preview Lab → · Contrast checker → · Palette generator →

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