#331F89#331F89

#331F89 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.4% C 0.164 H 282.2°. Best body text is #FFFFFF at 12.37:1 contrast (WCAG AA passes).

Color values

HEX#331F89
RGBrgb(51, 31, 137)
HSLhsl(251, 63%, 33%)
HSVhsv(251, 77%, 54%)
CMYKcmyk(62.8%, 77.4%, 0%, 46.3%)
CIE-LABlab(21.91, 39.70, -55.46)
CIE-LCHlch(21.91, 68.20, 305.60°)
OKLaboklab(34.43% 0.0346 -0.1599)
OKLCHoklch(34.43% 0.164 282.2)
XYZxyz(6.3692, 3.4895, 24.0000)
Luminance0.0349 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F89 #75891F
analogous
#1F4089 #331F89 #681F89
triadic
#331F89 #89331F #1F8933
tetradic
#331F89 #891F40 #75891F #1F8968
square
#331F89 #891F40 #75891F #1F8968
split-complementary
#331F89 #89681F #40891F
monochromatic
#0E0825 #201457 #331F89 #462ABB #664CD6

Accessibility & contrast

On white

12.37
#331F89 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331F89 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F89
12.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F89#FFFFFF#000000##FFFFFF
##331F891.0012.371.7012.37
#FFFFFF12.371.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388C
Deuteranopia (green-blind)
#003187
Tritanopia (blue-blind)
#003D53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331f89;
/* rgb */ color: rgb(51, 31, 137);
/* oklch */ color: oklch(34.4% 0.164 282.2);
Tailwind
colors: {
  custom: {
    50: '#765dac',
    500: '#331f89',
    950: '#000000',
  },
}
SCSS
$custom: #331f89;
$custom-light: #765dac;
$custom-dark: #000000;
JSON
{
  "hex": "#331f89",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 137
  },
  "hsl": {
    "h": 251.321,
    "s": 63.095,
    "l": 32.941
  },
  "oklch": {
    "l": 0.34434,
    "c": 0.16362,
    "h": 282.2
  },
  "luminance": 0.0349
}

Semantic roles & 50–950 ramp

primary
#331F89
secondary
#A4B94B
accent
#E642C7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331F89

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

Preview Lab → · Contrast checker → · Palette generator →

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