#312978#312978

#312978 is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.2% C 0.129 H 281.7°. Best body text is #FFFFFF at 12.22:1 contrast (WCAG AA passes).

Color values

HEX#312978
RGBrgb(49, 41, 120)
HSLhsl(246, 49%, 32%)
HSVhsv(246, 66%, 47%)
CMYKcmyk(59.2%, 65.8%, 0%, 52.9%)
CIE-LABlab(22.28, 27.78, -44.11)
CIE-LCHlch(22.28, 52.13, 302.20°)
OKLaboklab(34.16% 0.0261 -0.1268)
OKLCHoklch(34.16% 0.129 281.7)
XYZxyz(5.4487, 3.5946, 18.1724)
Luminance0.0360 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312978 #707829
analogous
#294978 #312978 #592978
triadic
#312978 #783129 #297831
tetradic
#312978 #782949 #707829 #297859
square
#312978 #782949 #707829 #297859
split-complementary
#312978 #785929 #497829
monochromatic
#0C0A1D #1E194A #312978 #4439A6 #6156C5

Accessibility & contrast

On white

12.22
#312978 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#312978 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312978
12.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312978#FFFFFF#000000##FFFFFF
##3129781.0012.221.7212.22
#FFFFFF12.221.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00387B
Deuteranopia (green-blind)
#003276
Tritanopia (blue-blind)
#0B3D4C
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #312978;
/* rgb */ color: rgb(49, 41, 120);
/* oklch */ color: oklch(34.2% 0.129 281.7);
Tailwind
colors: {
  custom: {
    50: '#7163a0',
    500: '#312978',
    950: '#000000',
  },
}
SCSS
$custom: #312978;
$custom-light: #7163a0;
$custom-dark: #000000;
JSON
{
  "hex": "#312978",
  "rgb": {
    "r": 49,
    "g": 41,
    "b": 120
  },
  "hsl": {
    "h": 246.076,
    "s": 49.068,
    "l": 31.569
  },
  "oklch": {
    "l": 0.34164,
    "c": 0.12944,
    "h": 281.7
  },
  "luminance": 0.03595
}

Semantic roles & 50–950 ramp

primary
#312978
secondary
#A1AA53
accent
#D94FCB
background
#F7F5F9
surface
#EDEAF2
border
#C8C6CC
text
#08050F
muted
#7B797E

Preview Lab

Preview with #312978

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

Preview Lab → · Contrast checker → · Palette generator →

#312978 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva