#31278D#31278D

#31278D is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.8% C 0.160 H 278.9°. Best body text is #FFFFFF at 11.63:1 contrast (WCAG AA passes).

Color values

HEX#31278D
RGBrgb(49, 39, 141)
HSLhsl(246, 57%, 35%)
HSVhsv(246, 72%, 55%)
CMYKcmyk(65.2%, 72.3%, 0%, 44.7%)
CIE-LABlab(23.76, 36.17, -54.91)
CIE-LCHlch(23.76, 65.76, 303.38°)
OKLaboklab(35.83% 0.025 -0.1584)
OKLCHoklch(35.83% 0.16 278.9)
XYZxyz(6.7983, 4.0266, 25.6131)
Luminance0.0403 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31278D #838D27
analogous
#27508D #31278D #64278D
triadic
#31278D #8D3127 #278D31
tetradic
#31278D #8D2750 #838D27 #278D64
square
#31278D #8D2750 #838D27 #278D64
split-complementary
#31278D #8D6427 #508D27
monochromatic
#100C2D #201A5D #31278D #4234BD #685CD2

Accessibility & contrast

On white

11.63
#31278D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#31278D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31278D
11.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31278D#FFFFFF#000000##FFFFFF
##31278D1.0011.631.8111.63
#FFFFFF11.631.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#00348B
Tritanopia (blue-blind)
#004357
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #31278d;
/* rgb */ color: rgb(49, 39, 141);
/* oklch */ color: oklch(35.8% 0.160 278.9);
Tailwind
colors: {
  custom: {
    50: '#7562af',
    500: '#31278d',
    950: '#000000',
  },
}
SCSS
$custom: #31278d;
$custom-light: #7562af;
$custom-dark: #000000;
JSON
{
  "hex": "#31278d",
  "rgb": {
    "r": 49,
    "g": 39,
    "b": 141
  },
  "hsl": {
    "h": 245.882,
    "s": 56.667,
    "l": 35.294
  },
  "oklch": {
    "l": 0.35826,
    "c": 0.16039,
    "h": 278.9
  },
  "luminance": 0.04027
}

Semantic roles & 50–950 ramp

primary
#31278D
secondary
#AEB759
accent
#E048D1
background
#F7F5FA
surface
#EEEAF5
border
#C9C6CF
text
#090510
muted
#7B797F

Preview Lab

Preview with #31278D

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

Preview Lab → · Contrast checker → · Palette generator →

#31278D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva