#331F9A#331F9A

#331F9A is a dark, vivid blue. Relative luminance 0.040; OKLCH L 36.2% C 0.184 H 279.3°. Best body text is #FFFFFF at 11.64:1 contrast (WCAG AA passes).

Color values

HEX#331F9A
RGBrgb(51, 31, 154)
HSLhsl(250, 66%, 36%)
HSVhsv(250, 80%, 60%)
CMYKcmyk(66.9%, 79.9%, 0%, 39.6%)
CIE-LABlab(23.72, 44.99, -62.99)
CIE-LCHlch(23.72, 77.41, 305.54°)
OKLaboklab(36.25% 0.0299 -0.1819)
OKLCHoklch(36.25% 0.184 279.3)
XYZxyz(7.6861, 4.0162, 30.9358)
Luminance0.0402 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F9A #869A1F
analogous
#1F499A #331F9A #711F9A
triadic
#331F9A #9A331F #1F9A33
tetradic
#331F9A #9A1F49 #869A1F #1F9A71
square
#331F9A #9A1F49 #869A1F #1F9A71
split-complementary
#331F9A #9A711F #499A1F
monochromatic
#110A34 #221567 #331F9A #4429CD #6C56DD

Accessibility & contrast

On white

11.64
#331F9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331F9A
11.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F9A#FFFFFF#000000##FFFFFF
##331F9A1.0011.641.8011.64
#FFFFFF11.641.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.641.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331f9a;
/* rgb */ color: rgb(51, 31, 154);
/* oklch */ color: oklch(36.2% 0.184 279.3);
Tailwind
colors: {
  custom: {
    50: '#7a5eb9',
    500: '#331f9a',
    950: '#000000',
  },
}
SCSS
$custom: #331f9a;
$custom-light: #7a5eb9;
$custom-dark: #000000;
JSON
{
  "hex": "#331f9a",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 154
  },
  "hsl": {
    "h": 249.756,
    "s": 66.486,
    "l": 36.275
  },
  "oklch": {
    "l": 0.36249,
    "c": 0.18432,
    "h": 279.3
  },
  "luminance": 0.04017
}

Semantic roles & 50–950 ramp

primary
#331F9A
secondary
#AFC154
accent
#E93ECE
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0512
muted
#7C7981

Preview Lab

Preview with #331F9A

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

Preview Lab → · Contrast checker → · Palette generator →

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