#312E9D#312E9D

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

Color values

HEX#312E9D
RGBrgb(49, 46, 157)
HSLhsl(242, 55%, 40%)
HSVhsv(242, 71%, 62%)
CMYKcmyk(68.8%, 70.7%, 0%, 38.4%)
CIE-LABlab(26.85, 37.37, -59.68)
CIE-LCHlch(26.85, 70.42, 302.06°)
OKLaboklab(38.51% 0.0173 -0.1724)
OKLCHoklch(38.51% 0.173 275.7)
XYZxyz(8.3274, 5.0405, 32.4258)
Luminance0.0504 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312E9D #9A9D2E
analogous
#2E629D #312E9D #692E9D
triadic
#312E9D #9D312E #2E9D31
tetradic
#312E9D #9D2E62 #9A9D2E #2E9D69
square
#312E9D #9D2E62 #9A9D2E #2E9D69
split-complementary
#312E9D #9D692E #629D2E
monochromatic
#13123E #22206E #312E9D #4541C7 #7370D5

Accessibility & contrast

On white

10.46
#312E9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.01
#312E9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312E9D
10.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312E9D#FFFFFF#000000##FFFFFF
##312E9D1.0010.462.0110.46
#FFFFFF10.461.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A0
Deuteranopia (green-blind)
#003A9B
Tritanopia (blue-blind)
#004C62
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #312e9d;
/* rgb */ color: rgb(49, 46, 157);
/* oklch */ color: oklch(38.5% 0.173 275.7);
Tailwind
colors: {
  custom: {
    50: '#7868bb',
    500: '#312e9d',
    950: '#000000',
  },
}
SCSS
$custom: #312e9d;
$custom-light: #7868bb;
$custom-dark: #000000;
JSON
{
  "hex": "#312e9d",
  "rgb": {
    "r": 49,
    "g": 46,
    "b": 157
  },
  "hsl": {
    "h": 241.622,
    "s": 54.68,
    "l": 39.804
  },
  "oklch": {
    "l": 0.38514,
    "c": 0.17326,
    "h": 275.7
  },
  "luminance": 0.05041
}

Semantic roles & 50–950 ramp

primary
#312E9D
secondary
#BABD6A
accent
#DE4ADA
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #312E9D

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

Preview Lab → · Contrast checker → · Palette generator →

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