#31338C#31338C

#31338C is a dark, vivid blue. Relative luminance 0.049; OKLCH L 37.8% C 0.144 H 276.0°. Best body text is #FFFFFF at 10.59:1 contrast (WCAG AA passes).

Color values

HEX#31338C
RGBrgb(49, 51, 140)
HSLhsl(239, 48%, 37%)
HSVhsv(239, 65%, 55%)
CMYKcmyk(65%, 63.6%, 0%, 45.1%)
CIE-LABlab(26.49, 28.26, -49.83)
CIE-LCHlch(26.49, 57.28, 299.56°)
OKLaboklab(37.78% 0.0152 -0.1435)
OKLCHoklch(37.78% 0.144 276)
XYZxyz(7.1825, 4.9135, 25.3758)
Luminance0.0491 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31338C #8C8A31
analogous
#31618C #31338C #5C318C
triadic
#31338C #8C3133 #338C31
tetradic
#31338C #8C3161 #8C8A31 #318C5C
square
#31338C #8C3161 #8C8A31 #318C5C
split-complementary
#31338C #8C5C31 #618C31
monochromatic
#111231 #21225F #31338C #4144B9 #6C6ECC

Accessibility & contrast

On white

10.59
#31338C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.98
#31338C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31338C
10.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31338C#FFFFFF#000000##FFFFFF
##31338C1.0010.591.9810.59
#FFFFFF10.591.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00438F
Deuteranopia (green-blind)
#003B8A
Tritanopia (blue-blind)
#00495A
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #31338c;
/* rgb */ color: rgb(49, 51, 140);
/* oklch */ color: oklch(37.8% 0.144 276.0);
Tailwind
colors: {
  custom: {
    50: '#746bae',
    500: '#31338c',
    950: '#000000',
  },
}
SCSS
$custom: #31338c;
$custom-light: #746bae;
$custom-dark: #000000;
JSON
{
  "hex": "#31338c",
  "rgb": {
    "r": 49,
    "g": 51,
    "b": 140
  },
  "hsl": {
    "h": 238.681,
    "s": 48.148,
    "l": 37.059
  },
  "oklch": {
    "l": 0.37775,
    "c": 0.14431,
    "h": 276
  },
  "luminance": 0.04914
}

Semantic roles & 50–950 ramp

primary
#31338C
secondary
#B3B166
accent
#D550D8
background
#F7F6FA
surface
#EDEBF4
border
#C8C6CE
text
#090610
muted
#7B7A7F

Preview Lab

Preview with #31338C

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

Preview Lab → · Contrast checker → · Palette generator →

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