#312AA6#312AA6

#312AA6 is a dark, vivid blue. Relative luminance 0.051; OKLCH L 38.8% C 0.189 H 275.5°. Best body text is #FFFFFF at 10.44:1 contrast (WCAG AA passes).

Color values

HEX#312AA6
RGBrgb(49, 42, 166)
HSLhsl(243, 60%, 41%)
HSVhsv(243, 75%, 65%)
CMYKcmyk(70.5%, 74.7%, 0%, 34.9%)
CIE-LABlab(26.91, 42.74, -65.05)
CIE-LCHlch(26.91, 77.83, 303.31°)
OKLaboklab(38.83% 0.0181 -0.188)
OKLCHoklch(38.83% 0.189 275.5)
XYZxyz(8.9753, 5.0612, 36.5729)
Luminance0.0506 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312AA6 #9FA62A
analogous
#2A61A6 #312AA6 #6F2AA6
triadic
#312AA6 #A6312A #2AA631
tetradic
#312AA6 #A62A61 #9FA62A #2AA66F
square
#312AA6 #A62A61 #9FA62A #2AA66F
split-complementary
#312AA6 #A66F2A #61A62A
monochromatic
#141144 #231E75 #312AA6 #473FCE #7670DB

Accessibility & contrast

On white

10.44
#312AA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #312AA6
10.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312AA6#FFFFFF#000000##FFFFFF
##312AA61.0010.442.0110.44
#FFFFFF10.441.0021.001.00
#0000002.0121.001.0021.00
##FFFFFF10.441.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #312aa6;
/* rgb */ color: rgb(49, 42, 166);
/* oklch */ color: oklch(38.8% 0.189 275.5);
Tailwind
colors: {
  custom: {
    50: '#7b65c2',
    500: '#312aa6',
    950: '#000000',
  },
}
SCSS
$custom: #312aa6;
$custom-light: #7b65c2;
$custom-dark: #000000;
JSON
{
  "hex": "#312aa6",
  "rgb": {
    "r": 49,
    "g": 42,
    "b": 166
  },
  "hsl": {
    "h": 243.387,
    "s": 59.615,
    "l": 40.784
  },
  "oklch": {
    "l": 0.38828,
    "c": 0.18891,
    "h": 275.5
  },
  "luminance": 0.05062
}

Semantic roles & 50–950 ramp

primary
#312AA6
secondary
#BDC26A
accent
#E345DA
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #312AA6

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

Preview Lab → · Contrast checker → · Palette generator →

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