#312DA8#312DA8

#312DA8 is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.5% C 0.188 H 274.9°. Best body text is #FFFFFF at 10.14:1 contrast (WCAG AA passes).

Color values

HEX#312DA8
RGBrgb(49, 45, 168)
HSLhsl(242, 58%, 42%)
HSVhsv(242, 73%, 66%)
CMYKcmyk(70.8%, 73.2%, 0%, 34.1%)
CIE-LABlab(27.73, 41.68, -64.91)
CIE-LCHlch(27.73, 77.14, 302.71°)
OKLaboklab(39.47% 0.0161 -0.1876)
OKLCHoklch(39.47% 0.188 274.9)
XYZxyz(9.2706, 5.3560, 37.5834)
Luminance0.0536 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312DA8 #A4A82D
analogous
#2D67A8 #312DA8 #6F2DA8
triadic
#312DA8 #A8312D #2DA831
tetradic
#312DA8 #A82D67 #A4A82D #2DA86F
square
#312DA8 #A82D67 #A4A82D #2DA86F
split-complementary
#312DA8 #A86F2D #67A82D
monochromatic
#151347 #232078 #312DA8 #4945CD #7975DA

Accessibility & contrast

On white

10.14
#312DA8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#312DA8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312DA8
10.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312DA8#FFFFFF#000000##FFFFFF
##312DA81.0010.142.0710.14
#FFFFFF10.141.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047AC
Deuteranopia (green-blind)
#003CA6
Tritanopia (blue-blind)
#005068
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #312da8;
/* rgb */ color: rgb(49, 45, 168);
/* oklch */ color: oklch(39.5% 0.188 274.9);
Tailwind
colors: {
  custom: {
    50: '#7b67c3',
    500: '#312da8',
    950: '#000000',
  },
}
SCSS
$custom: #312da8;
$custom-light: #7b67c3;
$custom-dark: #000000;
JSON
{
  "hex": "#312da8",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 168
  },
  "hsl": {
    "h": 241.951,
    "s": 57.746,
    "l": 41.765
  },
  "oklch": {
    "l": 0.3947,
    "c": 0.18834,
    "h": 274.9
  },
  "luminance": 0.05357
}

Semantic roles & 50–950 ramp

primary
#312DA8
secondary
#BFC26F
accent
#E147DC
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #312DA8

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

Preview Lab → · Contrast checker → · Palette generator →

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