#313198#313198

#313198 is a dark, vivid blue. Relative luminance 0.051; OKLCH L 38.5% C 0.163 H 275.6°. Best body text is #FFFFFF at 10.38:1 contrast (WCAG AA passes).

Color values

HEX#313198
RGBrgb(49, 49, 152)
HSLhsl(240, 51%, 39%)
HSVhsv(240, 68%, 60%)
CMYKcmyk(67.8%, 67.8%, 0%, 40.4%)
CIE-LABlab(27.06, 33.79, -56.28)
CIE-LCHlch(27.06, 65.64, 300.98°)
OKLaboklab(38.52% 0.0158 -0.1624)
OKLCHoklch(38.52% 0.163 275.6)
XYZxyz(8.0306, 5.1159, 30.2639)
Luminance0.0512 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313198 #989831
analogous
#316598 #313198 #653198
triadic
#313198 #983131 #319831
tetradic
#313198 #983165 #989831 #319865
square
#313198 #983165 #989831 #319865
split-complementary
#313198 #986531 #659831
monochromatic
#13133B #22226A #313198 #4444C3 #7272D2

Accessibility & contrast

On white

10.38
#313198 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.02
#313198 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313198
10.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313198#FFFFFF#000000##FFFFFF
##3131981.0010.382.0210.38
#FFFFFF10.381.0021.001.00
#0000002.0221.001.0021.00
##FFFFFF10.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459B
Deuteranopia (green-blind)
#003B96
Tritanopia (blue-blind)
#004C60
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #313198;
/* rgb */ color: rgb(49, 49, 152);
/* oklch */ color: oklch(38.5% 0.163 275.6);
Tailwind
colors: {
  custom: {
    50: '#7769b7',
    500: '#313198',
    950: '#000000',
  },
}
SCSS
$custom: #313198;
$custom-light: #7769b7;
$custom-dark: #000000;
JSON
{
  "hex": "#313198",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 152
  },
  "hsl": {
    "h": 240,
    "s": 51.244,
    "l": 39.412
  },
  "oklch": {
    "l": 0.38524,
    "c": 0.16321,
    "h": 275.6
  },
  "luminance": 0.05117
}

Semantic roles & 50–950 ramp

primary
#313198
secondary
#B9B96B
accent
#DB4DDB
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0611
muted
#7C7A80

Preview Lab

Preview with #313198

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

Preview Lab → · Contrast checker → · Palette generator →

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