#31278B#31278B

#31278B is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.6% C 0.158 H 279.2°. Best body text is #FFFFFF at 11.71:1 contrast (WCAG AA passes).

Color values

HEX#31278B
RGBrgb(49, 39, 139)
HSLhsl(246, 56%, 35%)
HSVhsv(246, 72%, 55%)
CMYKcmyk(64.7%, 71.9%, 0%, 45.5%)
CIE-LABlab(23.56, 35.50, -53.99)
CIE-LCHlch(23.56, 64.62, 303.33°)
OKLaboklab(35.63% 0.0253 -0.1557)
OKLCHoklch(35.63% 0.158 279.2)
XYZxyz(6.6509, 3.9676, 24.8364)
Luminance0.0397 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31278B #818B27
analogous
#274F8B #31278B #63278B
triadic
#31278B #8B3127 #278B31
tetradic
#31278B #8B274F #818B27 #278B63
square
#31278B #8B274F #818B27 #278B63
split-complementary
#31278B #8B6327 #4F8B27
monochromatic
#0F0C2B #201A5B #31278B #4234BB #675BD1

Accessibility & contrast

On white

11.71
#31278B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.79
#31278B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31278B
11.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31278B#FFFFFF#000000##FFFFFF
##31278B1.0011.711.7911.71
#FFFFFF11.711.0021.001.00
#0000001.7921.001.0021.00
##FFFFFF11.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8E
Deuteranopia (green-blind)
#003489
Tritanopia (blue-blind)
#004256
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #31278b;
/* rgb */ color: rgb(49, 39, 139);
/* oklch */ color: oklch(35.6% 0.158 279.2);
Tailwind
colors: {
  custom: {
    50: '#7562ae',
    500: '#31278b',
    950: '#000000',
  },
}
SCSS
$custom: #31278b;
$custom-light: #7562ae;
$custom-dark: #000000;
JSON
{
  "hex": "#31278b",
  "rgb": {
    "r": 49,
    "g": 39,
    "b": 139
  },
  "hsl": {
    "h": 246,
    "s": 56.18,
    "l": 34.902
  },
  "oklch": {
    "l": 0.35627,
    "c": 0.15777,
    "h": 279.2
  },
  "luminance": 0.03968
}

Semantic roles & 50–950 ramp

primary
#31278B
secondary
#ADB658
accent
#DF48D0
background
#F7F5FA
surface
#EEEAF4
border
#C9C6CE
text
#090510
muted
#7B797F

Preview Lab

Preview with #31278B

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

Preview Lab → · Contrast checker → · Palette generator →

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