#331F98#331F98

#331F98 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 36.0% C 0.182 H 279.6°. Best body text is #FFFFFF at 11.73:1 contrast (WCAG AA passes).

Color values

HEX#331F98
RGBrgb(51, 31, 152)
HSLhsl(250, 66%, 36%)
HSVhsv(250, 80%, 60%)
CMYKcmyk(66.4%, 79.6%, 0%, 40.4%)
CIE-LABlab(23.51, 44.37, -62.12)
CIE-LCHlch(23.51, 76.34, 305.54°)
OKLaboklab(36.03% 0.0304 -0.1794)
OKLCHoklch(36.03% 0.182 279.6)
XYZxyz(7.5209, 3.9502, 30.0658)
Luminance0.0395 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331F98 #84981F
analogous
#1F4898 #331F98 #6F1F98
triadic
#331F98 #98331F #1F9833
tetradic
#331F98 #981F48 #84981F #1F986F
square
#331F98 #981F48 #84981F #1F986F
split-complementary
#331F98 #986F1F #48981F
monochromatic
#110A32 #221565 #331F98 #4429CB #6B55DC

Accessibility & contrast

On white

11.73
#331F98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#331F98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331F98
11.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331F98#FFFFFF#000000##FFFFFF
##331F981.0011.731.7911.73
#FFFFFF11.731.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C9B
Deuteranopia (green-blind)
#003396
Tritanopia (blue-blind)
#00435B
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #331f98;
/* rgb */ color: rgb(51, 31, 152);
/* oklch */ color: oklch(36.0% 0.182 279.6);
Tailwind
colors: {
  custom: {
    50: '#795eb8',
    500: '#331f98',
    950: '#000000',
  },
}
SCSS
$custom: #331f98;
$custom-light: #795eb8;
$custom-dark: #000000;
JSON
{
  "hex": "#331f98",
  "rgb": {
    "r": 51,
    "g": 31,
    "b": 152
  },
  "hsl": {
    "h": 249.917,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.36032,
    "c": 0.18193,
    "h": 279.6
  },
  "luminance": 0.03951
}

Semantic roles & 50–950 ramp

primary
#331F98
secondary
#AEC053
accent
#E93FCD
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #331F98

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

Preview Lab → · Contrast checker → · Palette generator →

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