#312398#312398

#312398 is a dark, vivid blue. Relative luminance 0.041; OKLCH L 36.4% C 0.179 H 278.1°. Best body text is #FFFFFF at 11.51:1 contrast (WCAG AA passes).

Color values

HEX#312398
RGBrgb(49, 35, 152)
HSLhsl(247, 63%, 37%)
HSVhsv(247, 77%, 60%)
CMYKcmyk(67.8%, 77%, 0%, 40.4%)
CIE-LABlab(24.07, 42.07, -61.20)
CIE-LCHlch(24.07, 74.26, 304.50°)
OKLaboklab(36.38% 0.0252 -0.1768)
OKLCHoklch(36.38% 0.179 278.1)
XYZxyz(7.5333, 4.1214, 30.0982)
Luminance0.0412 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312398 #8A9823
analogous
#235098 #312398 #6C2398
triadic
#312398 #983123 #239831
tetradic
#312398 #982350 #8A9823 #23986C
square
#312398 #982350 #8A9823 #23986C
split-complementary
#312398 #986C23 #509823
monochromatic
#110C35 #211866 #312398 #412ECA #6B5CD9

Accessibility & contrast

On white

11.51
#312398 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#312398 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312398
11.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312398#FFFFFF#000000##FFFFFF
##3123981.0011.511.8211.51
#FFFFFF11.511.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9B
Deuteranopia (green-blind)
#003496
Tritanopia (blue-blind)
#00455C
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #312398;
/* rgb */ color: rgb(49, 35, 152);
/* oklch */ color: oklch(36.4% 0.179 278.1);
Tailwind
colors: {
  custom: {
    50: '#7860b7',
    500: '#312398',
    950: '#000000',
  },
}
SCSS
$custom: #312398;
$custom-light: #7860b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312398",
  "rgb": {
    "r": 49,
    "g": 35,
    "b": 152
  },
  "hsl": {
    "h": 247.179,
    "s": 62.567,
    "l": 36.667
  },
  "oklch": {
    "l": 0.36384,
    "c": 0.17856,
    "h": 278.1
  },
  "luminance": 0.04122
}

Semantic roles & 50–950 ramp

primary
#312398
secondary
#B2BE59
accent
#E642D2
background
#F7F5FB
surface
#EEEAF6
border
#C9C6D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #312398

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

Preview Lab → · Contrast checker → · Palette generator →

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