#31398F#31398F

#31398F is a dark, vivid blue. Relative luminance 0.056; OKLCH L 39.2% C 0.141 H 273.9°. Best body text is #FFFFFF at 9.94:1 contrast (WCAG AA passes).

Color values

HEX#31398F
RGBrgb(49, 57, 143)
HSLhsl(235, 49%, 38%)
HSVhsv(235, 66%, 56%)
CMYKcmyk(65.7%, 60.1%, 0%, 43.9%)
CIE-LABlab(28.28, 25.36, -48.76)
CIE-LCHlch(28.28, 54.96, 297.48°)
OKLaboklab(39.18% 0.0096 -0.1403)
OKLCHoklch(39.18% 0.141 273.9)
XYZxyz(7.6860, 5.5617, 26.6498)
Luminance0.0556 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31398F #8F8731
analogous
#31688F #31398F #58318F
triadic
#31398F #8F3139 #398F31
tetradic
#31398F #8F3168 #8F8731 #318F58
square
#31398F #8F3168 #8F8731 #318F58
split-complementary
#31398F #8F5831 #688F31
monochromatic
#121534 #212761 #31398F #414BBD #6D75CD

Accessibility & contrast

On white

9.94
#31398F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.11
#31398F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31398F
9.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31398F#FFFFFF#000000##FFFFFF
##31398F1.009.942.119.94
#FFFFFF9.941.0021.001.00
#0000002.1121.001.0021.00
##FFFFFF9.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004792
Deuteranopia (green-blind)
#003F8D
Tritanopia (blue-blind)
#004E5E
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #31398f;
/* rgb */ color: rgb(49, 57, 143);
/* oklch */ color: oklch(39.2% 0.141 273.9);
Tailwind
colors: {
  custom: {
    50: '#746fb0',
    500: '#31398f',
    950: '#000000',
  },
}
SCSS
$custom: #31398f;
$custom-light: #746fb0;
$custom-dark: #000000;
JSON
{
  "hex": "#31398f",
  "rgb": {
    "r": 49,
    "g": 57,
    "b": 143
  },
  "hsl": {
    "h": 234.894,
    "s": 48.958,
    "l": 37.647
  },
  "oklch": {
    "l": 0.39176,
    "c": 0.14066,
    "h": 273.9
  },
  "luminance": 0.05562
}

Semantic roles & 50–950 ramp

primary
#31398F
secondary
#B5AE67
accent
#CD4FD9
background
#F7F6FA
surface
#EDECF5
border
#C8C7CF
text
#090711
muted
#7B7A80

Preview Lab

Preview with #31398F

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

Preview Lab → · Contrast checker → · Palette generator →

#31398F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva