#31398B#31398B

#31398B is a dark, vivid blue. Relative luminance 0.054; OKLCH L 38.8% C 0.135 H 274.1°. Best body text is #FFFFFF at 10.05:1 contrast (WCAG AA passes).

Color values

HEX#31398B
RGBrgb(49, 57, 139)
HSLhsl(235, 48%, 37%)
HSVhsv(235, 65%, 55%)
CMYKcmyk(64.7%, 59%, 0%, 45.5%)
CIE-LABlab(27.96, 23.91, -46.81)
CIE-LCHlch(27.96, 52.56, 297.05°)
OKLaboklab(38.84% 0.0096 -0.1346)
OKLCHoklch(38.84% 0.135 274.1)
XYZxyz(7.3884, 5.4427, 25.0823)
Luminance0.0544 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31398B #8B8331
analogous
#31668B #31398B #56318B
triadic
#31398B #8B3139 #398B31
tetradic
#31398B #8B3166 #8B8331 #318B56
square
#31398B #8B3166 #8B8331 #318B56
split-complementary
#31398B #8B5631 #668B31
monochromatic
#111431 #21265E #31398B #414CB8 #6B74CB

Accessibility & contrast

On white

10.05
#31398B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#31398B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31398B
10.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31398B#FFFFFF#000000##FFFFFF
##31398B1.0010.052.0910.05
#FFFFFF10.051.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00468E
Deuteranopia (green-blind)
#003E89
Tritanopia (blue-blind)
#004D5C
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #31398b;
/* rgb */ color: rgb(49, 57, 139);
/* oklch */ color: oklch(38.8% 0.135 274.1);
Tailwind
colors: {
  custom: {
    50: '#746fae',
    500: '#31398b',
    950: '#000000',
  },
}
SCSS
$custom: #31398b;
$custom-light: #746fae;
$custom-dark: #000000;
JSON
{
  "hex": "#31398b",
  "rgb": {
    "r": 49,
    "g": 57,
    "b": 139
  },
  "hsl": {
    "h": 234.667,
    "s": 47.872,
    "l": 36.863
  },
  "oklch": {
    "l": 0.38839,
    "c": 0.13492,
    "h": 274.1
  },
  "luminance": 0.05443
}

Semantic roles & 50–950 ramp

primary
#31398B
secondary
#B2AC65
accent
#CB50D7
background
#F7F6FA
surface
#EDECF4
border
#C8C7CE
text
#090710
muted
#7B7A7F

Preview Lab

Preview with #31398B

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

Preview Lab → · Contrast checker → · Palette generator →

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