#31339C#31339C

#31339C is a dark, vivid blue. Relative luminance 0.054; OKLCH L 39.2% C 0.166 H 274.8°. Best body text is #FFFFFF at 10.08:1 contrast (WCAG AA passes).

Color values

HEX#31339C
RGBrgb(49, 51, 156)
HSLhsl(239, 52%, 40%)
HSVhsv(239, 69%, 61%)
CMYKcmyk(68.6%, 67.3%, 0%, 38.8%)
CIE-LABlab(27.90, 33.93, -57.35)
CIE-LCHlch(27.90, 66.63, 300.61°)
OKLaboklab(39.24% 0.0139 -0.1656)
OKLCHoklch(39.24% 0.166 274.8)
XYZxyz(8.4492, 5.4202, 32.0470)
Luminance0.0542 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31339C #9C9A31
analogous
#31689C #31339C #65319C
triadic
#31339C #9C3133 #339C31
tetradic
#31339C #9C3168 #9C9A31 #319C65
square
#31339C #9C3168 #9C9A31 #319C65
split-complementary
#31339C #9C6531 #689C31
monochromatic
#14153F #22246D #31339C #4548C5 #7476D3

Accessibility & contrast

On white

10.08
#31339C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.08
#31339C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31339C
10.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31339C#FFFFFF#000000##FFFFFF
##31339C1.0010.082.0810.08
#FFFFFF10.081.0021.001.00
#0000002.0821.001.0021.00
##FFFFFF10.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00479F
Deuteranopia (green-blind)
#003D9A
Tritanopia (blue-blind)
#004F63
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #31339c;
/* rgb */ color: rgb(49, 51, 156);
/* oklch */ color: oklch(39.2% 0.166 274.8);
Tailwind
colors: {
  custom: {
    50: '#786bba',
    500: '#31339c',
    950: '#000000',
  },
}
SCSS
$custom: #31339c;
$custom-light: #786bba;
$custom-dark: #000000;
JSON
{
  "hex": "#31339c",
  "rgb": {
    "r": 49,
    "g": 51,
    "b": 156
  },
  "hsl": {
    "h": 238.879,
    "s": 52.195,
    "l": 40.196
  },
  "oklch": {
    "l": 0.39244,
    "c": 0.16615,
    "h": 274.8
  },
  "luminance": 0.05421
}

Semantic roles & 50–950 ramp

primary
#31339C
secondary
#BBBA6D
accent
#D94CDC
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#0A0612
muted
#7C7A81

Preview Lab

Preview with #31339C

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

Preview Lab → · Contrast checker → · Palette generator →

#31339C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva