#31318A#31318A

#31318A is a dark, vivid blue. Relative luminance 0.047; OKLCH L 37.2% C 0.144 H 276.8°. Best body text is #FFFFFF at 10.84:1 contrast (WCAG AA passes).

Color values

HEX#31318A
RGBrgb(49, 49, 138)
HSLhsl(240, 48%, 37%)
HSVhsv(240, 64%, 54%)
CMYKcmyk(64.5%, 64.5%, 0%, 45.9%)
CIE-LABlab(25.81, 28.86, -49.68)
CIE-LCHlch(25.81, 57.45, 300.15°)
OKLaboklab(37.23% 0.0171 -0.1431)
OKLCHoklch(37.23% 0.144 276.8)
XYZxyz(6.9509, 4.6840, 24.5776)
Luminance0.0469 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31318A #8A8A31
analogous
#315E8A #31318A #5E318A
triadic
#31318A #8A3131 #318A31
tetradic
#31318A #8A315E #8A8A31 #318A5E
square
#31318A #8A315E #8A8A31 #318A5E
split-complementary
#31318A #8A5E31 #5E8A31
monochromatic
#111130 #21215D #31318A #4141B7 #6B6BCA

Accessibility & contrast

On white

10.84
#31318A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#31318A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31318A
10.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31318A#FFFFFF#000000##FFFFFF
##31318A1.0010.841.9410.84
#FFFFFF10.841.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418D
Deuteranopia (green-blind)
#003988
Tritanopia (blue-blind)
#004758
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #31318a;
/* rgb */ color: rgb(49, 49, 138);
/* oklch */ color: oklch(37.2% 0.144 276.8);
Tailwind
colors: {
  custom: {
    50: '#7469ad',
    500: '#31318a',
    950: '#000000',
  },
}
SCSS
$custom: #31318a;
$custom-light: #7469ad;
$custom-dark: #000000;
JSON
{
  "hex": "#31318a",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 138
  },
  "hsl": {
    "h": 240,
    "s": 47.594,
    "l": 36.667
  },
  "oklch": {
    "l": 0.37229,
    "c": 0.1441,
    "h": 276.8
  },
  "luminance": 0.04685
}

Semantic roles & 50–950 ramp

primary
#31318A
secondary
#B2B265
accent
#D751D7
background
#F7F6FA
surface
#EDEBF4
border
#C8C6CE
text
#090610
muted
#7B7A7F

Preview Lab

Preview with #31318A

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

Preview Lab → · Contrast checker → · Palette generator →

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