#312DAB#312DAB

#312DAB is a dark, vivid blue. Relative luminance 0.055; OKLCH L 39.8% C 0.192 H 274.6°. Best body text is #FFFFFF at 10.03:1 contrast (WCAG AA passes).

Color values

HEX#312DAB
RGBrgb(49, 45, 171)
HSLhsl(242, 58%, 42%)
HSVhsv(242, 74%, 67%)
CMYKcmyk(71.3%, 73.7%, 0%, 32.9%)
CIE-LABlab(28.03, 42.68, -66.21)
CIE-LCHlch(28.03, 78.77, 302.81°)
OKLaboklab(39.78% 0.0155 -0.1914)
OKLCHoklch(39.78% 0.192 274.6)
XYZxyz(9.5533, 5.4691, 39.0724)
Luminance0.0547 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312DAB #A7AB2D
analogous
#2D68AB #312DAB #702DAB
triadic
#312DAB #AB312D #2DAB31
tetradic
#312DAB #AB2D68 #A7AB2D #2DAB70
square
#312DAB #AB2D68 #A7AB2D #2DAB70
split-complementary
#312DAB #AB702D #68AB2D
monochromatic
#15144A #23207B #312DAB #4B47CE #7A77DB

Accessibility & contrast

On white

10.03
#312DAB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#312DAB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312DAB
10.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312DAB#FFFFFF#000000##FFFFFF
##312DAB1.0010.032.0910.03
#FFFFFF10.031.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0048AF
Deuteranopia (green-blind)
#003CA9
Tritanopia (blue-blind)
#005169
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #312dab;
/* rgb */ color: rgb(49, 45, 171);
/* oklch */ color: oklch(39.8% 0.192 274.6);
Tailwind
colors: {
  custom: {
    50: '#7c68c5',
    500: '#312dab',
    950: '#000000',
  },
}
SCSS
$custom: #312dab;
$custom-light: #7c68c5;
$custom-dark: #000000;
JSON
{
  "hex": "#312dab",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 171
  },
  "hsl": {
    "h": 241.905,
    "s": 58.333,
    "l": 42.353
  },
  "oklch": {
    "l": 0.39779,
    "c": 0.19207,
    "h": 274.6
  },
  "luminance": 0.0547
}

Semantic roles & 50–950 ramp

primary
#312DAB
secondary
#C1C371
accent
#E246DD
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #312DAB

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

Preview Lab → · Contrast checker → · Palette generator →

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