#312E98#312E98

#312E98 is a dark, vivid blue. Relative luminance 0.049; OKLCH L 38.0% C 0.167 H 276.2°. Best body text is #FFFFFF at 10.63:1 contrast (WCAG AA passes).

Color values

HEX#312E98
RGBrgb(49, 46, 152)
HSLhsl(242, 54%, 39%)
HSVhsv(242, 70%, 60%)
CMYKcmyk(67.8%, 69.7%, 0%, 40.4%)
CIE-LABlab(26.37, 35.66, -57.41)
CIE-LCHlch(26.37, 67.58, 301.85°)
OKLaboklab(38.02% 0.018 -0.1658)
OKLCHoklch(38.02% 0.167 276.2)
XYZxyz(7.9093, 4.8733, 30.2235)
Luminance0.0487 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312E98 #95982E
analogous
#2E6098 #312E98 #662E98
triadic
#312E98 #98312E #2E9831
tetradic
#312E98 #982E60 #95982E #2E9866
square
#312E98 #982E60 #95982E #2E9866
split-complementary
#312E98 #98662E #60982E
monochromatic
#13123A #222069 #312E98 #423EC5 #706DD3

Accessibility & contrast

On white

10.63
#312E98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.97
#312E98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312E98
10.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312E98#FFFFFF#000000##FFFFFF
##312E981.0010.631.9710.63
#FFFFFF10.631.0021.001.00
#0000001.9721.001.0021.00
##FFFFFF10.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439B
Deuteranopia (green-blind)
#003A96
Tritanopia (blue-blind)
#004A5F
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #312e98;
/* rgb */ color: rgb(49, 46, 152);
/* oklch */ color: oklch(38.0% 0.167 276.2);
Tailwind
colors: {
  custom: {
    50: '#7767b7',
    500: '#312e98',
    950: '#000000',
  },
}
SCSS
$custom: #312e98;
$custom-light: #7767b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312e98",
  "rgb": {
    "r": 49,
    "g": 46,
    "b": 152
  },
  "hsl": {
    "h": 241.698,
    "s": 53.535,
    "l": 38.824
  },
  "oklch": {
    "l": 0.38024,
    "c": 0.16674,
    "h": 276.2
  },
  "luminance": 0.04874
}

Semantic roles & 50–950 ramp

primary
#312E98
secondary
#B8BA68
accent
#DD4BD9
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #312E98

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

Preview Lab → · Contrast checker → · Palette generator →

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