#31228F#31228F

#31228F is a dark, vivid blue. Relative luminance 0.038; OKLCH L 35.3% C 0.168 H 279.6°. Best body text is #FFFFFF at 11.96:1 contrast (WCAG AA passes).

Color values

HEX#31228F
RGBrgb(49, 34, 143)
HSLhsl(248, 62%, 35%)
HSVhsv(248, 76%, 56%)
CMYKcmyk(65.7%, 76.2%, 0%, 43.9%)
CIE-LABlab(22.93, 39.72, -57.52)
CIE-LCHlch(22.93, 69.90, 304.63°)
OKLaboklab(35.3% 0.028 -0.166)
OKLCHoklch(35.3% 0.168 279.6)
XYZxyz(6.7950, 3.7797, 26.3527)
Luminance0.0378 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31228F #808F22
analogous
#224A8F #31228F #68228F
triadic
#31228F #8F3122 #228F31
tetradic
#31228F #8F224A #808F22 #228F68
square
#31228F #8F224A #808F22 #228F68
split-complementary
#31228F #8F6822 #4A8F22
monochromatic
#0F0A2C #20165E #31228F #422EC0 #6755D7

Accessibility & contrast

On white

11.96
#31228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#31228F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31228F
11.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31228F#FFFFFF#000000##FFFFFF
##31228F1.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)
#003B92
Deuteranopia (green-blind)
#00328D
Tritanopia (blue-blind)
#004157
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #31228f;
/* rgb */ color: rgb(49, 34, 143);
/* oklch */ color: oklch(35.3% 0.168 279.6);
Tailwind
colors: {
  custom: {
    50: '#765fb1',
    500: '#31228f',
    950: '#000000',
  },
}
SCSS
$custom: #31228f;
$custom-light: #765fb1;
$custom-dark: #000000;
JSON
{
  "hex": "#31228f",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 248.257,
    "s": 61.582,
    "l": 34.706
  },
  "oklch": {
    "l": 0.35298,
    "c": 0.16838,
    "h": 279.6
  },
  "luminance": 0.0378
}

Semantic roles & 50–950 ramp

primary
#31228F
secondary
#ACBA52
accent
#E543CE
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0511
muted
#7C7980

Preview Lab

Preview with #31228F

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

Preview Lab → · Contrast checker → · Palette generator →

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