#31318B#31318B

#31318B is a dark, vivid blue. Relative luminance 0.047; OKLCH L 37.3% C 0.145 H 276.7°. Best body text is #FFFFFF at 10.81:1 contrast (WCAG AA passes).

Color values

HEX#31318B
RGBrgb(49, 49, 139)
HSLhsl(240, 48%, 37%)
HSVhsv(240, 65%, 55%)
CMYKcmyk(64.7%, 64.7%, 0%, 45.5%)
CIE-LABlab(25.90, 29.21, -50.16)
CIE-LCHlch(25.90, 58.05, 300.21°)
OKLaboklab(37.32% 0.017 -0.1445)
OKLCHoklch(37.32% 0.146 276.7)
XYZxyz(7.0236, 4.7131, 24.9607)
Luminance0.0471 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31318B #8B8B31
analogous
#315E8B #31318B #5E318B
triadic
#31318B #8B3131 #318B31
tetradic
#31318B #8B315E #8B8B31 #318B5E
square
#31318B #8B315E #8B8B31 #318B5E
split-complementary
#31318B #8B5E31 #5E8B31
monochromatic
#111131 #21215E #31318B #4141B8 #6B6BCB

Accessibility & contrast

On white

10.81
#31318B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31318B
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31318B#FFFFFF#000000##FFFFFF
##31318B1.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00418E
Deuteranopia (green-blind)
#003989
Tritanopia (blue-blind)
#004859
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #31318b;
/* rgb */ color: rgb(49, 49, 139);
/* oklch */ color: oklch(37.3% 0.145 276.7);
Tailwind
colors: {
  custom: {
    50: '#7469ae',
    500: '#31318b',
    950: '#000000',
  },
}
SCSS
$custom: #31318b;
$custom-light: #7469ae;
$custom-dark: #000000;
JSON
{
  "hex": "#31318b",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 139
  },
  "hsl": {
    "h": 240,
    "s": 47.872,
    "l": 36.863
  },
  "oklch": {
    "l": 0.37319,
    "c": 0.1455,
    "h": 276.7
  },
  "luminance": 0.04714
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #31318B

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

Preview Lab → · Contrast checker → · Palette generator →

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