#312CA7#312CA7

#312CA7 is a dark, vivid blue. Relative luminance 0.052; OKLCH L 39.2% C 0.188 H 275.1°. Best body text is #FFFFFF at 10.25:1 contrast (WCAG AA passes).

Color values

HEX#312CA7
RGBrgb(49, 44, 167)
HSLhsl(242, 58%, 41%)
HSVhsv(242, 74%, 65%)
CMYKcmyk(70.7%, 73.7%, 0%, 34.5%)
CIE-LABlab(27.42, 41.93, -64.81)
CIE-LCHlch(27.42, 77.19, 302.90°)
OKLaboklab(39.22% 0.0168 -0.1874)
OKLCHoklch(39.22% 0.188 275.1)
XYZxyz(9.1401, 5.2435, 37.0821)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312CA7 #A2A72C
analogous
#2C65A7 #312CA7 #6F2CA7
triadic
#312CA7 #A7312C #2CA731
tetradic
#312CA7 #A72C65 #A2A72C #2CA76F
square
#312CA7 #A72C65 #A2A72C #2CA76F
split-complementary
#312CA7 #A76F2C #65A72C
monochromatic
#151246 #231F77 #312CA7 #4843CD #7773DA

Accessibility & contrast

On white

10.25
#312CA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#312CA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312CA7
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312CA7#FFFFFF#000000##FFFFFF
##312CA71.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #312ca7;
/* rgb */ color: rgb(49, 44, 167);
/* oklch */ color: oklch(39.2% 0.188 275.1);
Tailwind
colors: {
  custom: {
    50: '#7b67c2',
    500: '#312ca7',
    950: '#000000',
  },
}
SCSS
$custom: #312ca7;
$custom-light: #7b67c2;
$custom-dark: #000000;
JSON
{
  "hex": "#312ca7",
  "rgb": {
    "r": 49,
    "g": 44,
    "b": 167
  },
  "hsl": {
    "h": 242.439,
    "s": 58.294,
    "l": 41.373
  },
  "oklch": {
    "l": 0.3922,
    "c": 0.18812,
    "h": 275.1
  },
  "luminance": 0.05244
}

Semantic roles & 50–950 ramp

primary
#312CA7
secondary
#BEC26D
accent
#E246DB
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #312CA7

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

Preview Lab → · Contrast checker → · Palette generator →

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