#31398C#31398C

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

Color values

HEX#31398C
RGBrgb(49, 57, 140)
HSLhsl(235, 48%, 37%)
HSVhsv(235, 65%, 55%)
CMYKcmyk(65%, 59.3%, 0%, 45.1%)
CIE-LABlab(28.04, 24.27, -47.30)
CIE-LCHlch(28.04, 53.16, 297.16°)
OKLaboklab(38.92% 0.0096 -0.136)
OKLCHoklch(38.92% 0.136 274)
XYZxyz(7.4618, 5.4720, 25.4688)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31398C #8C8431
analogous
#31678C #31398C #57318C
triadic
#31398C #8C3139 #398C31
tetradic
#31398C #8C3167 #8C8431 #318C57
square
#31398C #8C3167 #8C8431 #318C57
split-complementary
#31398C #8C5731 #678C31
monochromatic
#111431 #21275F #31398C #414BB9 #6C74CC

Accessibility & contrast

On white

10.03
#31398C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31398C
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31398C#FFFFFF#000000##FFFFFF
##31398C1.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31398c;
/* rgb */ color: rgb(49, 57, 140);
/* oklch */ color: oklch(38.9% 0.136 274.0);
Tailwind
colors: {
  custom: {
    50: '#746fae',
    500: '#31398c',
    950: '#000000',
  },
}
SCSS
$custom: #31398c;
$custom-light: #746fae;
$custom-dark: #000000;
JSON
{
  "hex": "#31398c",
  "rgb": {
    "r": 49,
    "g": 57,
    "b": 140
  },
  "hsl": {
    "h": 234.725,
    "s": 48.148,
    "l": 37.059
  },
  "oklch": {
    "l": 0.38923,
    "c": 0.13637,
    "h": 274
  },
  "luminance": 0.05473
}

Semantic roles & 50–950 ramp

primary
#31398C
secondary
#B3AC66
accent
#CC50D8
background
#F7F6FA
surface
#EDECF4
border
#C8C7CE
text
#090710
muted
#7B7A7F

Preview Lab

Preview with #31398C

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

Preview Lab → · Contrast checker → · Palette generator →

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