#312BA4#312BA4

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

Color values

HEX#312BA4
RGBrgb(49, 43, 164)
HSLhsl(243, 58%, 41%)
HSVhsv(243, 74%, 64%)
CMYKcmyk(70.1%, 73.8%, 0%, 35.7%)
CIE-LABlab(26.91, 41.51, -63.84)
CIE-LCHlch(26.91, 76.15, 303.03°)
OKLaboklab(38.76% 0.018 -0.1845)
OKLCHoklch(38.76% 0.185 275.6)
XYZxyz(8.8291, 5.0602, 35.6262)
Luminance0.0506 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312BA4 #9EA42B
analogous
#2B61A4 #312BA4 #6D2BA4
triadic
#312BA4 #A4312B #2BA431
tetradic
#312BA4 #A42B61 #9EA42B #2BA46D
square
#312BA4 #A42B61 #9EA42B #2BA46D
split-complementary
#312BA4 #A46D2B #61A42B
monochromatic
#141243 #231E74 #312BA4 #463FCD #7570D9

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##312BA4#FFFFFF#000000##FFFFFF
##312BA41.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)
#0045A8
Deuteranopia (green-blind)
#003AA2
Tritanopia (blue-blind)
#004D65
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #312ba4;
/* rgb */ color: rgb(49, 43, 164);
/* oklch */ color: oklch(38.8% 0.185 275.6);
Tailwind
colors: {
  custom: {
    50: '#7a66c0',
    500: '#312ba4',
    950: '#000000',
  },
}
SCSS
$custom: #312ba4;
$custom-light: #7a66c0;
$custom-dark: #000000;
JSON
{
  "hex": "#312ba4",
  "rgb": {
    "r": 49,
    "g": 43,
    "b": 164
  },
  "hsl": {
    "h": 242.975,
    "s": 58.454,
    "l": 40.588
  },
  "oklch": {
    "l": 0.38764,
    "c": 0.1854,
    "h": 275.6
  },
  "luminance": 0.05061
}

Semantic roles & 50–950 ramp

primary
#312BA4
secondary
#BCC16A
accent
#E246DA
background
#F8F6FC
surface
#EFEBF8
border
#CAC6D1
text
#0B0612
muted
#7C7A81

Preview Lab

Preview with #312BA4

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

Preview Lab → · Contrast checker → · Palette generator →

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