#31287F#31287F

#31287F is a dark, vivid blue. Relative luminance 0.037; OKLCH L 34.6% C 0.140 H 280.8°. Best body text is #FFFFFF at 12.06:1 contrast (WCAG AA passes).

Color values

HEX#31287F
RGBrgb(49, 40, 127)
HSLhsl(246, 52%, 33%)
HSVhsv(246, 69%, 50%)
CMYKcmyk(61.4%, 68.5%, 0%, 50.2%)
CIE-LABlab(22.66, 30.82, -47.93)
CIE-LCHlch(22.66, 56.99, 302.74°)
OKLaboklab(34.63% 0.0263 -0.138)
OKLCHoklch(34.63% 0.14 280.8)
XYZxyz(5.8550, 3.7024, 20.4807)
Luminance0.0370 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31287F #767F28
analogous
#284A7F #31287F #5C287F
triadic
#31287F #7F3128 #287F31
tetradic
#31287F #7F284A #767F28 #287F5C
square
#31287F #7F284A #767F28 #287F5C
split-complementary
#31287F #7F5C28 #4A7F28
monochromatic
#0D0B22 #1F1950 #31287F #4337AE #6357CA

Accessibility & contrast

On white

12.06
#31287F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#31287F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31287F
12.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31287F#FFFFFF#000000##FFFFFF
##31287F1.0012.061.7412.06
#FFFFFF12.061.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003982
Deuteranopia (green-blind)
#00337D
Tritanopia (blue-blind)
#003E50
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31287f;
/* rgb */ color: rgb(49, 40, 127);
/* oklch */ color: oklch(34.6% 0.140 280.8);
Tailwind
colors: {
  custom: {
    50: '#7263a5',
    500: '#31287f',
    950: '#000000',
  },
}
SCSS
$custom: #31287f;
$custom-light: #7263a5;
$custom-dark: #000000;
JSON
{
  "hex": "#31287f",
  "rgb": {
    "r": 49,
    "g": 40,
    "b": 127
  },
  "hsl": {
    "h": 246.207,
    "s": 52.096,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34632,
    "c": 0.14049,
    "h": 280.8
  },
  "luminance": 0.03703
}

Semantic roles & 50–950 ramp

primary
#31287F
secondary
#A6AF54
accent
#DC4CCD
background
#F7F5FA
surface
#EDEAF4
border
#C8C6CE
text
#09050F
muted
#7B797F

Preview Lab

Preview with #31287F

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

Preview Lab → · Contrast checker → · Palette generator →

#31287F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva