#312197#312197

#312197 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 36.0% C 0.179 H 278.5°. Best body text is #FFFFFF at 11.70:1 contrast (WCAG AA passes).

Color values

HEX#312197
RGBrgb(49, 33, 151)
HSLhsl(248, 64%, 36%)
HSVhsv(248, 78%, 59%)
CMYKcmyk(67.5%, 78.1%, 0%, 40.8%)
CIE-LABlab(23.59, 42.82, -61.38)
CIE-LCHlch(23.59, 74.84, 304.90°)
OKLaboklab(36.01% 0.0266 -0.1773)
OKLCHoklch(36.01% 0.179 278.5)
XYZxyz(7.3946, 3.9744, 29.6496)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312197 #879721
analogous
#214C97 #312197 #6C2197
triadic
#312197 #973121 #219731
tetradic
#312197 #97214C #879721 #21976C
square
#312197 #97214C #879721 #21976C
split-complementary
#312197 #976C21 #4C9721
monochromatic
#100B33 #211665 #312197 #412CC9 #6A58DA

Accessibility & contrast

On white

11.70
#312197 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#312197 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312197
11.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312197#FFFFFF#000000##FFFFFF
##3121971.0011.701.8011.70
#FFFFFF11.701.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D9A
Deuteranopia (green-blind)
#003395
Tritanopia (blue-blind)
#00445B
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #312197;
/* rgb */ color: rgb(49, 33, 151);
/* oklch */ color: oklch(36.0% 0.179 278.5);
Tailwind
colors: {
  custom: {
    50: '#785fb7',
    500: '#312197',
    950: '#000000',
  },
}
SCSS
$custom: #312197;
$custom-light: #785fb7;
$custom-dark: #000000;
JSON
{
  "hex": "#312197",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 151
  },
  "hsl": {
    "h": 248.136,
    "s": 64.13,
    "l": 36.078
  },
  "oklch": {
    "l": 0.36013,
    "c": 0.17927,
    "h": 278.5
  },
  "luminance": 0.03975
}

Semantic roles & 50–950 ramp

primary
#312197
secondary
#B0BE55
accent
#E741D1
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #312197

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

Preview Lab → · Contrast checker → · Palette generator →

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