#312778#312778

#312778 is a dark, vivid blue. Relative luminance 0.035; OKLCH L 33.8% C 0.132 H 282.3°. Best body text is #FFFFFF at 12.41:1 contrast (WCAG AA passes).

Color values

HEX#312778
RGBrgb(49, 39, 120)
HSLhsl(247, 51%, 31%)
HSVhsv(247, 68%, 47%)
CMYKcmyk(59.2%, 67.5%, 0%, 52.9%)
CIE-LABlab(21.80, 29.07, -44.90)
CIE-LCHlch(21.80, 53.49, 302.92°)
OKLaboklab(33.81% 0.0282 -0.1291)
OKLCHoklch(33.81% 0.132 282.3)
XYZxyz(5.3813, 3.4597, 18.1499)
Luminance0.0346 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312778 #6E7827
analogous
#274578 #312778 #592778
triadic
#312778 #783127 #277831
tetradic
#312778 #782745 #6E7827 #277859
square
#312778 #782745 #6E7827 #277859
split-complementary
#312778 #785927 #457827
monochromatic
#0B091C #1E184A #312778 #4436A6 #6152C7

Accessibility & contrast

On white

12.41
#312778 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#312778 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312778
12.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312778#FFFFFF#000000##FFFFFF
##3127781.0012.411.6912.41
#FFFFFF12.411.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377B
Deuteranopia (green-blind)
#003176
Tritanopia (blue-blind)
#0B3B4B
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #312778;
/* rgb */ color: rgb(49, 39, 120);
/* oklch */ color: oklch(33.8% 0.132 282.3);
Tailwind
colors: {
  custom: {
    50: '#7162a0',
    500: '#312778',
    950: '#000000',
  },
}
SCSS
$custom: #312778;
$custom-light: #7162a0;
$custom-dark: #000000;
JSON
{
  "hex": "#312778",
  "rgb": {
    "r": 49,
    "g": 39,
    "b": 120
  },
  "hsl": {
    "h": 247.407,
    "s": 50.943,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33812,
    "c": 0.13214,
    "h": 282.3
  },
  "luminance": 0.0346
}

Semantic roles & 50–950 ramp

primary
#312778
secondary
#9FAA51
accent
#DA4DC9
background
#F7F5F9
surface
#EDEAF2
border
#C8C6CC
text
#08050F
muted
#7B797E

Preview Lab

Preview with #312778

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

Preview Lab → · Contrast checker → · Palette generator →

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