#312AA7#312AA7

#312AA7 is a dark, vivid blue. Relative luminance 0.051; OKLCH L 38.9% C 0.190 H 275.4°. Best body text is #FFFFFF at 10.40:1 contrast (WCAG AA passes).

Color values

HEX#312AA7
RGBrgb(49, 42, 167)
HSLhsl(243, 60%, 41%)
HSVhsv(243, 75%, 65%)
CMYKcmyk(70.7%, 74.9%, 0%, 34.5%)
CIE-LABlab(27.01, 43.06, -65.48)
CIE-LCHlch(27.01, 78.37, 303.33°)
OKLaboklab(38.93% 0.0179 -0.1893)
OKLCHoklch(38.93% 0.19 275.4)
XYZxyz(9.0673, 5.0981, 37.0579)
Luminance0.0510 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312AA7 #A0A72A
analogous
#2A61A7 #312AA7 #6F2AA7
triadic
#312AA7 #A7312A #2AA731
tetradic
#312AA7 #A72A61 #A0A72A #2AA76F
square
#312AA7 #A72A61 #A0A72A #2AA76F
split-complementary
#312AA7 #A76F2A #61A72A
monochromatic
#141145 #231E76 #312AA7 #473FCF #7670DB

Accessibility & contrast

On white

10.40
#312AA7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#312AA7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312AA7
10.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312AA7#FFFFFF#000000##FFFFFF
##312AA71.0010.402.0210.40
#FFFFFF10.401.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045AB
Deuteranopia (green-blind)
#003AA5
Tritanopia (blue-blind)
#004E66
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #312aa7;
/* rgb */ color: rgb(49, 42, 167);
/* oklch */ color: oklch(38.9% 0.190 275.4);
Tailwind
colors: {
  custom: {
    50: '#7b65c2',
    500: '#312aa7',
    950: '#000000',
  },
}
SCSS
$custom: #312aa7;
$custom-light: #7b65c2;
$custom-dark: #000000;
JSON
{
  "hex": "#312aa7",
  "rgb": {
    "r": 49,
    "g": 42,
    "b": 167
  },
  "hsl": {
    "h": 243.36,
    "s": 59.809,
    "l": 40.98
  },
  "oklch": {
    "l": 0.38933,
    "c": 0.19015,
    "h": 275.4
  },
  "luminance": 0.05099
}

Semantic roles & 50–950 ramp

primary
#312AA7
secondary
#BDC26B
accent
#E345DA
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0613
muted
#7C7A82

Preview Lab

Preview with #312AA7

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

Preview Lab → · Contrast checker → · Palette generator →

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