#331F88#331F88

#331F88 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.3% C 0.162 H 282.4°. Best body text is #FFFFFF at 12.41:1 contrast (WCAG AA passes).

Color values

HEX#331F88
RGBrgb(51, 31, 136)
HSLhsl(251, 63%, 33%)
HSVhsv(251, 77%, 53%)
CMYKcmyk(62.5%, 77.2%, 0%, 46.7%)
CIE-LABlab(21.80, 39.38, -55.00)
CIE-LCHlch(21.80, 67.65, 305.61°)
OKLaboklab(34.33% 0.0348 -0.1586)
OKLCHoklch(34.33% 0.162 282.4)
XYZxyz(6.2978, 3.4609, 23.6239)
Luminance0.0346 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F88 #74881F
analogous
#1F3F88 #331F88 #681F88
triadic
#331F88 #88331F #1F8833
tetradic
#331F88 #881F3F #74881F #1F8868
square
#331F88 #881F3F #74881F #1F8868
split-complementary
#331F88 #88681F #3F881F
monochromatic
#0E0824 #201456 #331F88 #462ABA #664BD6

Accessibility & contrast

On white

12.41
#331F88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#331F88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F88
12.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F88#FFFFFF#000000##FFFFFF
##331F881.0012.411.6912.41
#FFFFFF12.411.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388B
Deuteranopia (green-blind)
#003186
Tritanopia (blue-blind)
#003D52
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331f88;
/* rgb */ color: rgb(51, 31, 136);
/* oklch */ color: oklch(34.3% 0.162 282.4);
Tailwind
colors: {
  custom: {
    50: '#765dac',
    500: '#331f88',
    950: '#000000',
  },
}
SCSS
$custom: #331f88;
$custom-light: #765dac;
$custom-dark: #000000;
JSON
{
  "hex": "#331f88",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 136
  },
  "hsl": {
    "h": 251.429,
    "s": 62.874,
    "l": 32.745
  },
  "oklch": {
    "l": 0.3433,
    "c": 0.16238,
    "h": 282.4
  },
  "luminance": 0.03461
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331F88

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

Preview Lab → · Contrast checker → · Palette generator →

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