#312A9D#312A9D

#312A9D is a dark, vivid blue. Relative luminance 0.047; OKLCH L 37.9% C 0.178 H 276.4°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#312A9D
RGBrgb(49, 42, 157)
HSLhsl(244, 58%, 39%)
HSVhsv(244, 73%, 62%)
CMYKcmyk(68.8%, 73.2%, 0%, 38.4%)
CIE-LABlab(25.99, 39.76, -61.10)
CIE-LCHlch(25.99, 72.89, 303.05°)
OKLaboklab(37.9% 0.0199 -0.1765)
OKLCHoklch(37.9% 0.178 276.4)
XYZxyz(8.1784, 4.7425, 32.3761)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312A9D #969D2A
analogous
#2A5D9D #312A9D #6B2A9D
triadic
#312A9D #9D312A #2A9D31
tetradic
#312A9D #9D2A5D #969D2A #2A9D6B
square
#312A9D #9D2A5D #969D2A #2A9D6B
split-complementary
#312A9D #9D6B2A #5D9D2A
monochromatic
#13103C #221D6D #312A9D #433ACA #716AD7

Accessibility & contrast

On white

10.78
#312A9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#312A9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312A9D
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312A9D#FFFFFF#000000##FFFFFF
##312A9D1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0042A0
Deuteranopia (green-blind)
#00389B
Tritanopia (blue-blind)
#004A61
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #312a9d;
/* rgb */ color: rgb(49, 42, 157);
/* oklch */ color: oklch(37.9% 0.178 276.4);
Tailwind
colors: {
  custom: {
    50: '#7965bb',
    500: '#312a9d',
    950: '#000000',
  },
}
SCSS
$custom: #312a9d;
$custom-light: #7965bb;
$custom-dark: #000000;
JSON
{
  "hex": "#312a9d",
  "rgb": {
    "r": 49,
    "g": 42,
    "b": 157
  },
  "hsl": {
    "h": 243.652,
    "s": 57.789,
    "l": 39.02
  },
  "oklch": {
    "l": 0.37898,
    "c": 0.17764,
    "h": 276.4
  },
  "luminance": 0.04743
}

Semantic roles & 50–950 ramp

primary
#312A9D
secondary
#B8BE65
accent
#E147D8
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #312A9D

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

Preview Lab → · Contrast checker → · Palette generator →

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