#312D98#312D98

#312D98 is a dark, vivid blue. Relative luminance 0.048; OKLCH L 37.9% C 0.168 H 276.4°. Best body text is #FFFFFF at 10.72:1 contrast (WCAG AA passes).

Color values

HEX#312D98
RGBrgb(49, 45, 152)
HSLhsl(242, 54%, 39%)
HSVhsv(242, 70%, 60%)
CMYKcmyk(67.8%, 70.4%, 0%, 40.4%)
CIE-LABlab(26.15, 36.27, -57.78)
CIE-LCHlch(26.15, 68.22, 302.12°)
OKLaboklab(37.86% 0.0187 -0.1668)
OKLCHoklch(37.86% 0.168 276.4)
XYZxyz(7.8707, 4.7961, 30.2106)
Luminance0.0480 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312D98 #94982D
analogous
#2D5E98 #312D98 #662D98
triadic
#312D98 #98312D #2D9831
tetradic
#312D98 #982D5E #94982D #2D9866
square
#312D98 #982D5E #94982D #2D9866
split-complementary
#312D98 #98662D #5E982D
monochromatic
#13113A #221F69 #312D98 #423DC5 #706CD3

Accessibility & contrast

On white

10.72
#312D98 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#312D98 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312D98
10.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312D98#FFFFFF#000000##FFFFFF
##312D981.0010.721.9610.72
#FFFFFF10.721.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.721.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #312d98;
/* rgb */ color: rgb(49, 45, 152);
/* oklch */ color: oklch(37.9% 0.168 276.4);
Tailwind
colors: {
  custom: {
    50: '#7767b7',
    500: '#312d98',
    950: '#000000',
  },
}
SCSS
$custom: #312d98;
$custom-light: #7767b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312d98",
  "rgb": {
    "r": 49,
    "g": 45,
    "b": 152
  },
  "hsl": {
    "h": 242.243,
    "s": 54.315,
    "l": 38.627
  },
  "oklch": {
    "l": 0.37862,
    "c": 0.16789,
    "h": 276.4
  },
  "luminance": 0.04797
}

Semantic roles & 50–950 ramp

primary
#312D98
secondary
#B7BA66
accent
#DE4AD8
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #312D98

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

Preview Lab → · Contrast checker → · Palette generator →

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