#312498#312498

#312498 is a dark, vivid blue. Relative luminance 0.042; OKLCH L 36.5% C 0.178 H 278.0°. Best body text is #FFFFFF at 11.44:1 contrast (WCAG AA passes).

Color values

HEX#312498
RGBrgb(49, 36, 152)
HSLhsl(247, 62%, 37%)
HSVhsv(247, 76%, 60%)
CMYKcmyk(67.8%, 76.3%, 0%, 40.4%)
CIE-LABlab(24.26, 41.52, -60.88)
CIE-LCHlch(24.26, 73.69, 304.29°)
OKLaboklab(36.52% 0.0246 -0.1759)
OKLCHoklch(36.52% 0.178 278)
XYZxyz(7.5632, 4.1811, 30.1081)
Luminance0.0418 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312498 #8B9824
analogous
#245198 #312498 #6B2498
triadic
#312498 #983124 #249831
tetradic
#312498 #982451 #8B9824 #24986B
square
#312498 #982451 #8B9824 #24986B
split-complementary
#312498 #986B24 #519824
monochromatic
#110D35 #211867 #312498 #4130C9 #6B5ED9

Accessibility & contrast

On white

11.44
#312498 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#312498 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312498
11.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312498#FFFFFF#000000##FFFFFF
##3124981.0011.441.8411.44
#FFFFFF11.441.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9B
Deuteranopia (green-blind)
#003596
Tritanopia (blue-blind)
#00455C
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #312498;
/* rgb */ color: rgb(49, 36, 152);
/* oklch */ color: oklch(36.5% 0.178 278.0);
Tailwind
colors: {
  custom: {
    50: '#7861b7',
    500: '#312498',
    950: '#000000',
  },
}
SCSS
$custom: #312498;
$custom-light: #7861b7;
$custom-dark: #000000;
JSON
{
  "hex": "#312498",
  "rgb": {
    "r": 49,
    "g": 36,
    "b": 152
  },
  "hsl": {
    "h": 246.724,
    "s": 61.702,
    "l": 36.863
  },
  "oklch": {
    "l": 0.36519,
    "c": 0.17758,
    "h": 278
  },
  "luminance": 0.04182
}

Semantic roles & 50–950 ramp

primary
#312498
secondary
#B2BE5A
accent
#E543D3
background
#F7F5FB
surface
#EEEAF6
border
#C9C6D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #312498

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

Preview Lab → · Contrast checker → · Palette generator →

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