#31318E#31318E

#31318E is a dark, vivid blue. Relative luminance 0.048; OKLCH L 37.6% C 0.150 H 276.4°. Best body text is #FFFFFF at 10.71:1 contrast (WCAG AA passes).

Color values

HEX#31318E
RGBrgb(49, 49, 142)
HSLhsl(240, 49%, 37%)
HSVhsv(240, 65%, 56%)
CMYKcmyk(65.5%, 65.5%, 0%, 44.3%)
CIE-LABlab(26.16, 30.27, -51.59)
CIE-LCHlch(26.16, 59.82, 300.40°)
OKLaboklab(37.59% 0.0168 -0.1487)
OKLCHoklch(37.59% 0.15 276.4)
XYZxyz(7.2458, 4.8020, 26.1310)
Luminance0.0480 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31318E #8E8E31
analogous
#31608E #31318E #60318E
triadic
#31318E #8E3131 #318E31
tetradic
#31318E #8E3160 #8E8E31 #318E60
square
#31318E #8E3160 #8E8E31 #318E60
split-complementary
#31318E #8E6031 #608E31
monochromatic
#121233 #212161 #31318E #4141BB #6D6DCD

Accessibility & contrast

On white

10.71
#31318E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#31318E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31318E
10.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31318E#FFFFFF#000000##FFFFFF
##31318E1.0010.711.9610.71
#FFFFFF10.711.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.711.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31318e;
/* rgb */ color: rgb(49, 49, 142);
/* oklch */ color: oklch(37.6% 0.150 276.4);
Tailwind
colors: {
  custom: {
    50: '#7569b0',
    500: '#31318e',
    950: '#000000',
  },
}
SCSS
$custom: #31318e;
$custom-light: #7569b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31318e",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 142
  },
  "hsl": {
    "h": 240,
    "s": 48.691,
    "l": 37.451
  },
  "oklch": {
    "l": 0.37592,
    "c": 0.14965,
    "h": 276.4
  },
  "luminance": 0.04803
}

Semantic roles & 50–950 ramp

primary
#31318E
secondary
#B4B467
accent
#D850D8
background
#F7F6FA
surface
#EEEBF5
border
#C9C6CF
text
#090611
muted
#7B7A80

Preview Lab

Preview with #31318E

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

Preview Lab → · Contrast checker → · Palette generator →

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