#31318C#31318C

#31318C is a dark, vivid blue. Relative luminance 0.047; OKLCH L 37.4% C 0.147 H 276.6°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#31318C
RGBrgb(49, 49, 140)
HSLhsl(240, 48%, 37%)
HSVhsv(240, 65%, 55%)
CMYKcmyk(65%, 65%, 0%, 45.1%)
CIE-LABlab(25.99, 29.56, -50.64)
CIE-LCHlch(25.99, 58.64, 300.28°)
OKLaboklab(37.41% 0.0169 -0.1459)
OKLCHoklch(37.41% 0.147 276.6)
XYZxyz(7.0970, 4.7425, 25.3472)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31318C #8C8C31
analogous
#315F8C #31318C #5F318C
triadic
#31318C #8C3131 #318C31
tetradic
#31318C #8C315F #8C8C31 #318C5F
square
#31318C #8C315F #8C8C31 #318C5F
split-complementary
#31318C #8C5F31 #5F8C31
monochromatic
#111131 #21215F #31318C #4141B9 #6C6CCC

Accessibility & contrast

On white

10.78
#31318C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#31318C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31318C
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31318C#FFFFFF#000000##FFFFFF
##31318C1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428F
Deuteranopia (green-blind)
#003A8A
Tritanopia (blue-blind)
#00485A
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #31318c;
/* rgb */ color: rgb(49, 49, 140);
/* oklch */ color: oklch(37.4% 0.147 276.6);
Tailwind
colors: {
  custom: {
    50: '#7469ae',
    500: '#31318c',
    950: '#000000',
  },
}
SCSS
$custom: #31318c;
$custom-light: #7469ae;
$custom-dark: #000000;
JSON
{
  "hex": "#31318c",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 140
  },
  "hsl": {
    "h": 240,
    "s": 48.148,
    "l": 37.059
  },
  "oklch": {
    "l": 0.3741,
    "c": 0.14689,
    "h": 276.6
  },
  "luminance": 0.04743
}

Semantic roles & 50–950 ramp

primary
#31318C
secondary
#B3B366
accent
#D850D8
background
#F7F6FA
surface
#EDEBF4
border
#C8C6CE
text
#090610
muted
#7B7A7F

Preview Lab

Preview with #31318C

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

Preview Lab → · Contrast checker → · Palette generator →

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