#31238F#31238F

#31238F is a dark, vivid blue. Relative luminance 0.038; OKLCH L 35.4% C 0.167 H 279.4°. Best body text is #FFFFFF at 11.88:1 contrast (WCAG AA passes).

Color values

HEX#31238F
RGBrgb(49, 35, 143)
HSLhsl(248, 61%, 35%)
HSVhsv(248, 76%, 56%)
CMYKcmyk(65.7%, 75.5%, 0%, 43.9%)
CIE-LABlab(23.13, 39.16, -57.19)
CIE-LCHlch(23.13, 69.31, 304.40°)
OKLaboklab(35.44% 0.0274 -0.1651)
OKLCHoklch(35.44% 0.167 279.4)
XYZxyz(6.8240, 3.8377, 26.3624)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31238F #818F23
analogous
#234B8F #31238F #67238F
triadic
#31238F #8F3123 #238F31
tetradic
#31238F #8F234B #818F23 #238F67
square
#31238F #8F234B #818F23 #238F67
split-complementary
#31238F #8F6723 #4B8F23
monochromatic
#0F0B2D #20175E #31238F #422FC0 #6757D6

Accessibility & contrast

On white

11.88
#31238F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#31238F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31238F
11.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31238F#FFFFFF#000000##FFFFFF
##31238F1.0011.881.7711.88
#FFFFFF11.881.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B92
Deuteranopia (green-blind)
#00338D
Tritanopia (blue-blind)
#004257
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #31238f;
/* rgb */ color: rgb(49, 35, 143);
/* oklch */ color: oklch(35.4% 0.167 279.4);
Tailwind
colors: {
  custom: {
    50: '#7660b1',
    500: '#31238f',
    950: '#000000',
  },
}
SCSS
$custom: #31238f;
$custom-light: #7660b1;
$custom-dark: #000000;
JSON
{
  "hex": "#31238f",
  "rgb": {
    "r": 49,
    "g": 35,
    "b": 143
  },
  "hsl": {
    "h": 247.778,
    "s": 60.674,
    "l": 34.902
  },
  "oklch": {
    "l": 0.35438,
    "c": 0.16734,
    "h": 279.4
  },
  "luminance": 0.03838
}

Semantic roles & 50–950 ramp

primary
#31238F
secondary
#ADBA54
accent
#E444CF
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31238F

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

Preview Lab → · Contrast checker → · Palette generator →

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