#31318F#31318F

#31318F is a dark, vivid blue. Relative luminance 0.048; OKLCH L 37.7% C 0.151 H 276.3°. Best body text is #FFFFFF at 10.68:1 contrast (WCAG AA passes).

Color values

HEX#31318F
RGBrgb(49, 49, 143)
HSLhsl(240, 49%, 38%)
HSVhsv(240, 66%, 56%)
CMYKcmyk(65.7%, 65.7%, 0%, 43.9%)
CIE-LABlab(26.25, 30.62, -52.07)
CIE-LCHlch(26.25, 60.41, 300.46°)
OKLaboklab(37.68% 0.0167 -0.1501)
OKLCHoklch(37.68% 0.151 276.3)
XYZxyz(7.3212, 4.8322, 26.5282)
Luminance0.0483 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31318F #8F8F31
analogous
#31608F #31318F #60318F
triadic
#31318F #8F3131 #318F31
tetradic
#31318F #8F3160 #8F8F31 #318F60
square
#31318F #8F3160 #8F8F31 #318F60
split-complementary
#31318F #8F6031 #608F31
monochromatic
#121234 #212161 #31318F #4141BD #6D6DCD

Accessibility & contrast

On white

10.68
#31318F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#31318F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31318F
10.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31318F#FFFFFF#000000##FFFFFF
##31318F1.0010.681.9710.68
#FFFFFF10.681.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004292
Deuteranopia (green-blind)
#003A8D
Tritanopia (blue-blind)
#00495B
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #31318f;
/* rgb */ color: rgb(49, 49, 143);
/* oklch */ color: oklch(37.7% 0.151 276.3);
Tailwind
colors: {
  custom: {
    50: '#7569b1',
    500: '#31318f',
    950: '#000000',
  },
}
SCSS
$custom: #31318f;
$custom-light: #7569b1;
$custom-dark: #000000;
JSON
{
  "hex": "#31318f",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 143
  },
  "hsl": {
    "h": 240,
    "s": 48.958,
    "l": 37.647
  },
  "oklch": {
    "l": 0.37683,
    "c": 0.15103,
    "h": 276.3
  },
  "luminance": 0.04833
}

Semantic roles & 50–950 ramp

primary
#31318F
secondary
#B5B567
accent
#D94FD9
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#090611
muted
#7B7A80

Preview Lab

Preview with #31318F

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

Preview Lab → · Contrast checker → · Palette generator →

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