#313178#313178

#313178 is a dark, moderate blue. Relative luminance 0.042; OKLCH L 35.7% C 0.118 H 278.6°. Best body text is #FFFFFF at 11.41:1 contrast (WCAG AA passes).

Color values

HEX#313178
RGBrgb(49, 49, 120)
HSLhsl(240, 42%, 33%)
HSVhsv(240, 59%, 47%)
CMYKcmyk(59.2%, 59.2%, 0%, 52.9%)
CIE-LABlab(24.34, 22.45, -40.77)
CIE-LCHlch(24.34, 46.54, 298.84°)
OKLaboklab(35.68% 0.0176 -0.1169)
OKLCHoklch(35.68% 0.118 278.6)
XYZxyz(5.7540, 4.2053, 18.2741)
Luminance0.0421 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313178 #787831
analogous
#315478 #313178 #543178
triadic
#313178 #783131 #317831
tetradic
#313178 #783154 #787831 #317854
square
#313178 #783154 #787831 #317854
split-complementary
#313178 #785431 #547831
monochromatic
#0E0E21 #1F1F4D #313178 #4343A3 #6464C0

Accessibility & contrast

On white

11.41
#313178 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#313178 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313178
11.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313178#FFFFFF#000000##FFFFFF
##3131781.0011.411.8411.41
#FFFFFF11.411.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D7A
Deuteranopia (green-blind)
#003777
Tritanopia (blue-blind)
#09424F
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #313178;
/* rgb */ color: rgb(49, 49, 120);
/* oklch */ color: oklch(35.7% 0.118 278.6);
Tailwind
colors: {
  custom: {
    50: '#7069a0',
    500: '#313178',
    950: '#000000',
  },
}
SCSS
$custom: #313178;
$custom-light: #7069a0;
$custom-dark: #000000;
JSON
{
  "hex": "#313178",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 120
  },
  "hsl": {
    "h": 240,
    "s": 42.012,
    "l": 33.137
  },
  "oklch": {
    "l": 0.35677,
    "c": 0.11822,
    "h": 278.6
  },
  "luminance": 0.04206
}

Semantic roles & 50–950 ramp

primary
#313178
secondary
#A7A75E
accent
#D256D2
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#08060F
muted
#7B7A7E

Preview Lab

Preview with #313178

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

Preview Lab → · Contrast checker → · Palette generator →

#313178 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva