#31238D#31238D

#31238D is a dark, vivid blue. Relative luminance 0.038; OKLCH L 35.2% C 0.165 H 279.7°. Best body text is #FFFFFF at 11.96:1 contrast (WCAG AA passes).

Color values

HEX#31238D
RGBrgb(49, 35, 141)
HSLhsl(248, 60%, 35%)
HSVhsv(248, 75%, 55%)
CMYKcmyk(65.2%, 75.2%, 0%, 44.7%)
CIE-LABlab(22.92, 38.51, -56.29)
CIE-LCHlch(22.92, 68.20, 304.38°)
OKLaboklab(35.23% 0.0278 -0.1624)
OKLCHoklch(35.23% 0.165 279.7)
XYZxyz(6.6738, 3.7776, 25.5716)
Luminance0.0378 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31238D #7F8D23
analogous
#234A8D #31238D #66238D
triadic
#31238D #8D3123 #238D31
tetradic
#31238D #8D234A #7F8D23 #238D66
square
#31238D #8D234A #7F8D23 #238D66
split-complementary
#31238D #8D6623 #4A8D23
monochromatic
#0F0B2B #20175C #31238D #422FBE #6655D5

Accessibility & contrast

On white

11.96
#31238D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#31238D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31238D
11.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31238D#FFFFFF#000000##FFFFFF
##31238D1.0011.961.7611.96
#FFFFFF11.961.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B90
Deuteranopia (green-blind)
#00338B
Tritanopia (blue-blind)
#004156
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #31238d;
/* rgb */ color: rgb(49, 35, 141);
/* oklch */ color: oklch(35.2% 0.165 279.7);
Tailwind
colors: {
  custom: {
    50: '#7660af',
    500: '#31238d',
    950: '#000000',
  },
}
SCSS
$custom: #31238d;
$custom-light: #7660af;
$custom-dark: #000000;
JSON
{
  "hex": "#31238d",
  "rgb": {
    "r": 49,
    "g": 35,
    "b": 141
  },
  "hsl": {
    "h": 247.925,
    "s": 60.227,
    "l": 34.51
  },
  "oklch": {
    "l": 0.3523,
    "c": 0.16481,
    "h": 279.7
  },
  "luminance": 0.03778
}

Semantic roles & 50–950 ramp

primary
#31238D
secondary
#ABB953
accent
#E344CE
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31238D

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

Preview Lab → · Contrast checker → · Palette generator →

#31238D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva