#31338F#31338F

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

Color values

HEX#31338F
RGBrgb(49, 51, 143)
HSLhsl(239, 49%, 38%)
HSVhsv(239, 66%, 56%)
CMYKcmyk(65.7%, 64.3%, 0%, 43.9%)
CIE-LABlab(26.74, 29.33, -51.26)
CIE-LCHlch(26.74, 59.06, 299.77°)
OKLaboklab(38.04% 0.015 -0.1477)
OKLCHoklch(38.04% 0.148 275.8)
XYZxyz(7.4068, 5.0032, 26.5567)
Luminance0.0500 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31338F #8F8D31
analogous
#31628F #31338F #5E318F
triadic
#31338F #8F3133 #338F31
tetradic
#31338F #8F3162 #8F8D31 #318F5E
square
#31338F #8F3162 #8F8D31 #318F5E
split-complementary
#31338F #8F5E31 #628F31
monochromatic
#121234 #212361 #31338F #4143BD #6D6FCD

Accessibility & contrast

On white

10.50
#31338F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#31338F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31338F
10.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31338F#FFFFFF#000000##FFFFFF
##31338F1.0010.502.0010.50
#FFFFFF10.501.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004392
Deuteranopia (green-blind)
#003B8D
Tritanopia (blue-blind)
#004A5C
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #31338f;
/* rgb */ color: rgb(49, 51, 143);
/* oklch */ color: oklch(38.0% 0.148 275.8);
Tailwind
colors: {
  custom: {
    50: '#756bb1',
    500: '#31338f',
    950: '#000000',
  },
}
SCSS
$custom: #31338f;
$custom-light: #756bb1;
$custom-dark: #000000;
JSON
{
  "hex": "#31338f",
  "rgb": {
    "r": 49,
    "g": 51,
    "b": 143
  },
  "hsl": {
    "h": 238.723,
    "s": 48.958,
    "l": 37.647
  },
  "oklch": {
    "l": 0.38044,
    "c": 0.14849,
    "h": 275.8
  },
  "luminance": 0.05004
}

Semantic roles & 50–950 ramp

primary
#31338F
secondary
#B5B367
accent
#D64FD9
background
#F7F6FB
surface
#EEEBF6
border
#C9C6D0
text
#090611
muted
#7B7A80

Preview Lab

Preview with #31338F

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

Preview Lab → · Contrast checker → · Palette generator →

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