#31398D#31398D

#31398D is a dark, vivid blue. Relative luminance 0.055; OKLCH L 39.0% C 0.138 H 274.0°. Best body text is #FFFFFF at 10.00:1 contrast (WCAG AA passes).

Color values

HEX#31398D
RGBrgb(49, 57, 141)
HSLhsl(235, 48%, 37%)
HSVhsv(235, 65%, 55%)
CMYKcmyk(65.2%, 59.6%, 0%, 44.7%)
CIE-LABlab(28.12, 24.63, -47.79)
CIE-LCHlch(28.12, 53.76, 297.27°)
OKLaboklab(39.01% 0.0096 -0.1375)
OKLCHoklch(39.01% 0.138 274)
XYZxyz(7.5359, 5.5017, 25.8589)
Luminance0.0550 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31398D #8D8531
analogous
#31678D #31398D #57318D
triadic
#31398D #8D3139 #398D31
tetradic
#31398D #8D3167 #8D8531 #318D57
square
#31398D #8D3167 #8D8531 #318D57
split-complementary
#31398D #8D5731 #678D31
monochromatic
#111432 #212760 #31398D #414BBA #6C75CC

Accessibility & contrast

On white

10.00
#31398D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.10
#31398D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31398D
10.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31398D#FFFFFF#000000##FFFFFF
##31398D1.0010.002.1010.00
#FFFFFF10.001.0021.001.00
#0000002.1021.001.0021.00
##FFFFFF10.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004690
Deuteranopia (green-blind)
#003E8B
Tritanopia (blue-blind)
#004D5D
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #31398d;
/* rgb */ color: rgb(49, 57, 141);
/* oklch */ color: oklch(39.0% 0.138 274.0);
Tailwind
colors: {
  custom: {
    50: '#746faf',
    500: '#31398d',
    950: '#000000',
  },
}
SCSS
$custom: #31398d;
$custom-light: #746faf;
$custom-dark: #000000;
JSON
{
  "hex": "#31398d",
  "rgb": {
    "r": 49,
    "g": 57,
    "b": 141
  },
  "hsl": {
    "h": 234.783,
    "s": 48.421,
    "l": 37.255
  },
  "oklch": {
    "l": 0.39007,
    "c": 0.1378,
    "h": 274
  },
  "luminance": 0.05502
}

Semantic roles & 50–950 ramp

primary
#31398D
secondary
#B4AD66
accent
#CC50D8
background
#F7F6FA
surface
#EDECF5
border
#C8C7CF
text
#090710
muted
#7B7A7F

Preview Lab

Preview with #31398D

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

Preview Lab → · Contrast checker → · Palette generator →

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