#31338B#31338B

#31338B is a dark, vivid blue. Relative luminance 0.049; OKLCH L 37.7% C 0.143 H 276.1°. Best body text is #FFFFFF at 10.62:1 contrast (WCAG AA passes).

Color values

HEX#31338B
RGBrgb(49, 51, 139)
HSLhsl(239, 48%, 37%)
HSVhsv(239, 65%, 55%)
CMYKcmyk(64.7%, 63.3%, 0%, 45.5%)
CIE-LABlab(26.40, 27.90, -49.34)
CIE-LCHlch(26.40, 56.68, 299.48°)
OKLaboklab(37.69% 0.0152 -0.1421)
OKLCHoklch(37.69% 0.143 276.1)
XYZxyz(7.1091, 4.8841, 24.9892)
Luminance0.0488 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31338B #8B8931
analogous
#31608B #31338B #5C318B
triadic
#31338B #8B3133 #338B31
tetradic
#31338B #8B3160 #8B8931 #318B5C
square
#31338B #8B3160 #8B8931 #318B5C
split-complementary
#31338B #8B5C31 #608B31
monochromatic
#111231 #21225E #31338B #4144B8 #6B6ECB

Accessibility & contrast

On white

10.62
#31338B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31338B
10.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31338B#FFFFFF#000000##FFFFFF
##31338B1.0010.621.9810.62
#FFFFFF10.621.0021.001.00
#0000001.9821.001.0021.00
##FFFFFF10.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00428E
Deuteranopia (green-blind)
#003B89
Tritanopia (blue-blind)
#00495A
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #31338b;
/* rgb */ color: rgb(49, 51, 139);
/* oklch */ color: oklch(37.7% 0.143 276.1);
Tailwind
colors: {
  custom: {
    50: '#746bae',
    500: '#31338b',
    950: '#000000',
  },
}
SCSS
$custom: #31338b;
$custom-light: #746bae;
$custom-dark: #000000;
JSON
{
  "hex": "#31338b",
  "rgb": {
    "r": 49,
    "g": 51,
    "b": 139
  },
  "hsl": {
    "h": 238.667,
    "s": 47.872,
    "l": 36.863
  },
  "oklch": {
    "l": 0.37687,
    "c": 0.1429,
    "h": 276.1
  },
  "luminance": 0.04885
}

Semantic roles & 50–950 ramp

primary
#31338B
secondary
#B2B165
accent
#D450D7
background
#F7F6FA
surface
#EDEBF4
border
#C8C6CE
text
#090610
muted
#7B7A7F

Preview Lab

Preview with #31338B

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

Preview Lab → · Contrast checker → · Palette generator →

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