#31238C#31238C

#31238C is a dark, vivid blue. Relative luminance 0.037; OKLCH L 35.1% C 0.164 H 279.9°. Best body text is #FFFFFF at 12.00:1 contrast (WCAG AA passes).

Color values

HEX#31238C
RGBrgb(49, 35, 140)
HSLhsl(248, 60%, 34%)
HSVhsv(248, 75%, 55%)
CMYKcmyk(65%, 75%, 0%, 45.1%)
CIE-LABlab(22.82, 38.18, -55.83)
CIE-LCHlch(22.82, 67.64, 304.37°)
OKLaboklab(35.13% 0.0281 -0.1611)
OKLCHoklch(35.13% 0.164 279.9)
XYZxyz(6.5998, 3.7480, 25.1815)
Luminance0.0375 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31238C #7E8C23
analogous
#234A8C #31238C #66238C
triadic
#31238C #8C3123 #238C31
tetradic
#31238C #8C234A #7E8C23 #238C66
square
#31238C #8C234A #7E8C23 #238C66
split-complementary
#31238C #8C6623 #4A8C23
monochromatic
#0F0B2A #20175B #31238C #422FBD #6655D4

Accessibility & contrast

On white

12.00
#31238C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#31238C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31238C
12.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31238C#FFFFFF#000000##FFFFFF
##31238C1.0012.001.7512.00
#FFFFFF12.001.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8F
Deuteranopia (green-blind)
#00328A
Tritanopia (blue-blind)
#004055
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31238c;
/* rgb */ color: rgb(49, 35, 140);
/* oklch */ color: oklch(35.1% 0.164 279.9);
Tailwind
colors: {
  custom: {
    50: '#7660af',
    500: '#31238c',
    950: '#000000',
  },
}
SCSS
$custom: #31238c;
$custom-light: #7660af;
$custom-dark: #000000;
JSON
{
  "hex": "#31238c",
  "rgb": {
    "r": 49,
    "g": 35,
    "b": 140
  },
  "hsl": {
    "h": 248,
    "s": 60,
    "l": 34.314
  },
  "oklch": {
    "l": 0.35127,
    "c": 0.16354,
    "h": 279.9
  },
  "luminance": 0.03748
}

Semantic roles & 50–950 ramp

primary
#31238C
secondary
#ABB852
accent
#E345CE
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#090510
muted
#7B797F

Preview Lab

Preview with #31238C

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

Preview Lab → · Contrast checker → · Palette generator →

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