#31338E#31338E

#31338E is a dark, vivid blue. Relative luminance 0.050; OKLCH L 38.0% C 0.147 H 275.9°. Best body text is #FFFFFF at 10.53:1 contrast (WCAG AA passes).

Color values

HEX#31338E
RGBrgb(49, 51, 142)
HSLhsl(239, 49%, 37%)
HSVhsv(239, 65%, 56%)
CMYKcmyk(65.5%, 64.1%, 0%, 44.3%)
CIE-LABlab(26.66, 28.97, -50.79)
CIE-LCHlch(26.66, 58.47, 299.70°)
OKLaboklab(37.95% 0.015 -0.1463)
OKLCHoklch(37.95% 0.147 275.9)
XYZxyz(7.3313, 4.9730, 26.1595)
Luminance0.0497 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31338E #8E8C31
analogous
#31618E #31338E #5E318E
triadic
#31338E #8E3133 #338E31
tetradic
#31338E #8E3161 #8E8C31 #318E5E
square
#31338E #8E3161 #8E8C31 #318E5E
split-complementary
#31338E #8E5E31 #618E31
monochromatic
#121233 #212361 #31338E #4143BB #6D6FCD

Accessibility & contrast

On white

10.53
#31338E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.99
#31338E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31338E
10.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31338E#FFFFFF#000000##FFFFFF
##31338E1.0010.531.9910.53
#FFFFFF10.531.0021.001.00
#0000001.9921.001.0021.00
##FFFFFF10.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004391
Deuteranopia (green-blind)
#003B8C
Tritanopia (blue-blind)
#004A5B
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #31338e;
/* rgb */ color: rgb(49, 51, 142);
/* oklch */ color: oklch(38.0% 0.147 275.9);
Tailwind
colors: {
  custom: {
    50: '#756bb0',
    500: '#31338e',
    950: '#000000',
  },
}
SCSS
$custom: #31338e;
$custom-light: #756bb0;
$custom-dark: #000000;
JSON
{
  "hex": "#31338e",
  "rgb": {
    "r": 49,
    "g": 51,
    "b": 142
  },
  "hsl": {
    "h": 238.71,
    "s": 48.691,
    "l": 37.451
  },
  "oklch": {
    "l": 0.37954,
    "c": 0.14709,
    "h": 275.9
  },
  "luminance": 0.04974
}

Semantic roles & 50–950 ramp

primary
#31338E
secondary
#B4B267
accent
#D550D8
background
#F7F6FA
surface
#EDEBF5
border
#C8C6CF
text
#090611
muted
#7B7A80

Preview Lab

Preview with #31338E

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

Preview Lab → · Contrast checker → · Palette generator →

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