#312DA7#312DA7

#312DA7 is a dark, vivid blue. Relative luminance 0.053; OKLCH L 39.4% C 0.187 H 275.0°. Best body text is #FFFFFF at 10.17:1 contrast (WCAG AA passes).

Color values

HEX#312DA7
RGBrgb(49, 45, 167)
HSLhsl(242, 58%, 42%)
HSVhsv(242, 73%, 65%)
CMYKcmyk(70.7%, 73.1%, 0%, 34.5%)
CIE-LABlab(27.62, 41.35, -64.47)
CIE-LCHlch(27.62, 76.59, 302.68°)
OKLaboklab(39.37% 0.0163 -0.1864)
OKLCHoklch(39.37% 0.187 275)
XYZxyz(9.1778, 5.3189, 37.0947)
Luminance0.0532 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312DA7 #A3A72D
analogous
#2D66A7 #312DA7 #6E2DA7
triadic
#312DA7 #A7312D #2DA731
tetradic
#312DA7 #A72D66 #A3A72D #2DA76E
square
#312DA7 #A72D66 #A3A72D #2DA76E
split-complementary
#312DA7 #A76E2D #66A72D
monochromatic
#151347 #232077 #312DA7 #4944CD #7875DA

Accessibility & contrast

On white

10.17
#312DA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#312DA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312DA7
10.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312DA7#FFFFFF#000000##FFFFFF
##312DA71.0010.172.0610.17
#FFFFFF10.171.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047AB
Deuteranopia (green-blind)
#003CA5
Tritanopia (blue-blind)
#004F67
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #312da7;
/* rgb */ color: rgb(49, 45, 167);
/* oklch */ color: oklch(39.4% 0.187 275.0);
Tailwind
colors: {
  custom: {
    50: '#7b67c2',
    500: '#312da7',
    950: '#000000',
  },
}
SCSS
$custom: #312da7;
$custom-light: #7b67c2;
$custom-dark: #000000;
JSON
{
  "hex": "#312da7",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 167
  },
  "hsl": {
    "h": 241.967,
    "s": 57.547,
    "l": 41.569
  },
  "oklch": {
    "l": 0.39368,
    "c": 0.18709,
    "h": 275
  },
  "luminance": 0.0532
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #312DA7

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

Preview Lab → · Contrast checker → · Palette generator →

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