#312AA4#312AA4

#312AA4 is a dark, vivid blue. Relative luminance 0.050; OKLCH L 38.6% C 0.186 H 275.7°. Best body text is #FFFFFF at 10.51:1 contrast (WCAG AA passes).

Color values

HEX#312AA4
RGBrgb(49, 42, 164)
HSLhsl(243, 59%, 40%)
HSVhsv(243, 74%, 64%)
CMYKcmyk(70.1%, 74.4%, 0%, 35.7%)
CIE-LABlab(26.70, 42.08, -64.18)
CIE-LCHlch(26.70, 76.74, 303.25°)
OKLaboklab(38.62% 0.0185 -0.1855)
OKLCHoklch(38.62% 0.186 275.7)
XYZxyz(8.7932, 4.9884, 35.6142)
Luminance0.0499 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312AA4 #9DA42A
analogous
#2A60A4 #312AA4 #6E2AA4
triadic
#312AA4 #A4312A #2AA431
tetradic
#312AA4 #A42A60 #9DA42A #2AA46E
square
#312AA4 #A42A60 #9DA42A #2AA46E
split-complementary
#312AA4 #A46E2A #60A42A
monochromatic
#141143 #221E73 #312AA4 #463ECD #756EDA

Accessibility & contrast

On white

10.51
#312AA4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#312AA4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312AA4
10.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312AA4#FFFFFF#000000##FFFFFF
##312AA41.0010.512.0010.51
#FFFFFF10.511.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A8
Deuteranopia (green-blind)
#003AA2
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #312aa4;
/* rgb */ color: rgb(49, 42, 164);
/* oklch */ color: oklch(38.6% 0.186 275.7);
Tailwind
colors: {
  custom: {
    50: '#7a65c0',
    500: '#312aa4',
    950: '#000000',
  },
}
SCSS
$custom: #312aa4;
$custom-light: #7a65c0;
$custom-dark: #000000;
JSON
{
  "hex": "#312aa4",
  "rgb": {
    "r": 49,
    "g": 42,
    "b": 164
  },
  "hsl": {
    "h": 243.443,
    "s": 59.223,
    "l": 40.392
  },
  "oklch": {
    "l": 0.3862,
    "c": 0.18643,
    "h": 275.7
  },
  "luminance": 0.04989
}

Semantic roles & 50–950 ramp

primary
#312AA4
secondary
#BCC169
accent
#E245D9
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #312AA4

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

Preview Lab → · Contrast checker → · Palette generator →

#312AA4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva