#331F9B#331F9B

#331F9B is a dark, vivid blue. Relative luminance 0.041; OKLCH L 36.4% C 0.186 H 279.2°. Best body text is #FFFFFF at 11.60:1 contrast (WCAG AA passes).

Color values

HEX#331F9B
RGBrgb(51, 31, 155)
HSLhsl(250, 67%, 36%)
HSVhsv(250, 80%, 61%)
CMYKcmyk(67.1%, 80%, 0%, 39.2%)
CIE-LABlab(23.84, 45.30, -63.42)
CIE-LCHlch(23.84, 77.94, 305.54°)
OKLaboklab(36.36% 0.0296 -0.1831)
OKLCHoklch(36.36% 0.186 279.2)
XYZxyz(7.7697, 4.0497, 31.3762)
Luminance0.0405 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F9B #879B1F
analogous
#1F499B #331F9B #711F9B
triadic
#331F9B #9B331F #1F9B33
tetradic
#331F9B #9B1F49 #879B1F #1F9B71
square
#331F9B #9B1F49 #879B1F #1F9B71
split-complementary
#331F9B #9B711F #499B1F
monochromatic
#110B35 #221568 #331F9B #4429CE #6D57DD

Accessibility & contrast

On white

11.60
#331F9B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#331F9B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F9B
11.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F9B#FFFFFF#000000##FFFFFF
##331F9B1.0011.601.8111.60
#FFFFFF11.601.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D9E
Deuteranopia (green-blind)
#003499
Tritanopia (blue-blind)
#00445D
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #331f9b;
/* rgb */ color: rgb(51, 31, 155);
/* oklch */ color: oklch(36.4% 0.186 279.2);
Tailwind
colors: {
  custom: {
    50: '#7a5fba',
    500: '#331f9b',
    950: '#000000',
  },
}
SCSS
$custom: #331f9b;
$custom-light: #7a5fba;
$custom-dark: #000000;
JSON
{
  "hex": "#331f9b",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 155
  },
  "hsl": {
    "h": 249.677,
    "s": 66.667,
    "l": 36.471
  },
  "oklch": {
    "l": 0.36358,
    "c": 0.18551,
    "h": 279.2
  },
  "luminance": 0.0405
}

Semantic roles & 50–950 ramp

primary
#331F9B
secondary
#B0C155
accent
#EA3ECE
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #331F9B

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

Preview Lab → · Contrast checker → · Palette generator →

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