#312298#312298

#312298 is a dark, vivid blue. Relative luminance 0.041; OKLCH L 36.3% C 0.180 H 278.3°. Best body text is #FFFFFF at 11.58:1 contrast (WCAG AA passes).

Color values

HEX#312298
RGBrgb(49, 34, 152)
HSLhsl(248, 63%, 36%)
HSVhsv(248, 78%, 60%)
CMYKcmyk(67.8%, 77.6%, 0%, 40.4%)
CIE-LABlab(23.88, 42.60, -61.51)
CIE-LCHlch(23.88, 74.82, 304.71°)
OKLaboklab(36.25% 0.0258 -0.1777)
OKLCHoklch(36.25% 0.18 278.3)
XYZxyz(7.5043, 4.0634, 30.0885)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312298 #899822
analogous
#224E98 #312298 #6C2298
triadic
#312298 #983122 #229831
tetradic
#312298 #98224E #899822 #22986C
square
#312298 #98224E #899822 #22986C
split-complementary
#312298 #986C22 #4E9822
monochromatic
#110C34 #211766 #312298 #412DCA #6B5ADA

Accessibility & contrast

On white

11.58
#312298 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#312298 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312298
11.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312298#FFFFFF#000000##FFFFFF
##3122981.0011.581.8111.58
#FFFFFF11.581.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.581.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #312298;
/* rgb */ color: rgb(49, 34, 152);
/* oklch */ color: oklch(36.3% 0.180 278.3);
Tailwind
colors: {
  custom: {
    50: '#7860b8',
    500: '#312298',
    950: '#000000',
  },
}
SCSS
$custom: #312298;
$custom-light: #7860b8;
$custom-dark: #000000;
JSON
{
  "hex": "#312298",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 152
  },
  "hsl": {
    "h": 247.627,
    "s": 63.441,
    "l": 36.471
  },
  "oklch": {
    "l": 0.36251,
    "c": 0.17954,
    "h": 278.3
  },
  "luminance": 0.04064
}

Semantic roles & 50–950 ramp

primary
#312298
secondary
#B1BE57
accent
#E641D1
background
#F7F5FB
surface
#EEEAF6
border
#C9C6D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #312298

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

Preview Lab → · Contrast checker → · Palette generator →

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