#331F99#331F99

#331F99 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 36.1% C 0.183 H 279.5°. Best body text is #FFFFFF at 11.69:1 contrast (WCAG AA passes).

Color values

HEX#331F99
RGBrgb(51, 31, 153)
HSLhsl(250, 66%, 36%)
HSVhsv(250, 80%, 60%)
CMYKcmyk(66.7%, 79.7%, 0%, 40%)
CIE-LABlab(23.62, 44.68, -62.56)
CIE-LCHlch(23.62, 76.88, 305.54°)
OKLaboklab(36.14% 0.0301 -0.1806)
OKLCHoklch(36.14% 0.183 279.5)
XYZxyz(7.6032, 3.9831, 30.4990)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F99 #85991F
analogous
#1F4899 #331F99 #701F99
triadic
#331F99 #99331F #1F9933
tetradic
#331F99 #991F48 #85991F #1F9970
square
#331F99 #991F48 #85991F #1F9970
split-complementary
#331F99 #99701F #48991F
monochromatic
#110A33 #221566 #331F99 #4429CC #6C56DD

Accessibility & contrast

On white

11.69
#331F99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#331F99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F99
11.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F99#FFFFFF#000000##FFFFFF
##331F991.0011.691.8011.69
#FFFFFF11.691.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D9C
Deuteranopia (green-blind)
#003397
Tritanopia (blue-blind)
#00445C
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331f99;
/* rgb */ color: rgb(51, 31, 153);
/* oklch */ color: oklch(36.1% 0.183 279.5);
Tailwind
colors: {
  custom: {
    50: '#7a5eb8',
    500: '#331f99',
    950: '#000000',
  },
}
SCSS
$custom: #331f99;
$custom-light: #7a5eb8;
$custom-dark: #000000;
JSON
{
  "hex": "#331f99",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 153
  },
  "hsl": {
    "h": 249.836,
    "s": 66.304,
    "l": 36.078
  },
  "oklch": {
    "l": 0.3614,
    "c": 0.18313,
    "h": 279.5
  },
  "luminance": 0.03984
}

Semantic roles & 50–950 ramp

primary
#331F99
secondary
#AEC054
accent
#E93FCD
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0512
muted
#7C7981

Preview Lab

Preview with #331F99

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

Preview Lab → · Contrast checker → · Palette generator →

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