#31228A#31228A

#31228A is a dark, vivid blue. Relative luminance 0.036; OKLCH L 34.8% C 0.162 H 280.4°. Best body text is #FFFFFF at 12.16:1 contrast (WCAG AA passes).

Color values

HEX#31228A
RGBrgb(49, 34, 138)
HSLhsl(249, 60%, 34%)
HSVhsv(249, 75%, 54%)
CMYKcmyk(64.5%, 75.4%, 0%, 45.9%)
CIE-LABlab(22.41, 38.10, -55.25)
CIE-LCHlch(22.41, 67.12, 304.59°)
OKLaboklab(34.78% 0.0292 -0.1594)
OKLCHoklch(34.78% 0.162 280.4)
XYZxyz(6.4246, 3.6315, 24.4022)
Luminance0.0363 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31228A #7B8A22
analogous
#22478A #31228A #65228A
triadic
#31228A #8A3122 #228A31
tetradic
#31228A #8A2247 #7B8A22 #228A65
square
#31228A #8A2247 #7B8A22 #228A65
split-complementary
#31228A #8A6522 #478A22
monochromatic
#0E0A28 #201659 #31228A #422EBB #6552D4

Accessibility & contrast

On white

12.16
#31228A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#31228A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31228A
12.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31228A#FFFFFF#000000##FFFFFF
##31228A1.0012.161.7312.16
#FFFFFF12.161.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398D
Deuteranopia (green-blind)
#003288
Tritanopia (blue-blind)
#003F54
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31228a;
/* rgb */ color: rgb(49, 34, 138);
/* oklch */ color: oklch(34.8% 0.162 280.4);
Tailwind
colors: {
  custom: {
    50: '#755fad',
    500: '#31228a',
    950: '#000000',
  },
}
SCSS
$custom: #31228a;
$custom-light: #755fad;
$custom-dark: #000000;
JSON
{
  "hex": "#31228a",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 138
  },
  "hsl": {
    "h": 248.654,
    "s": 60.465,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34778,
    "c": 0.16208,
    "h": 280.4
  },
  "luminance": 0.03632
}

Semantic roles & 50–950 ramp

primary
#31228A
secondary
#A9B850
accent
#E444CD
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090510
muted
#7B797F

Preview Lab

Preview with #31228A

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

Preview Lab → · Contrast checker → · Palette generator →

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