#31227E#31227E

#31227E is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.6% C 0.147 H 282.5°. Best body text is #FFFFFF at 12.65:1 contrast (WCAG AA passes).

Color values

HEX#31227E
RGBrgb(49, 34, 126)
HSLhsl(250, 58%, 31%)
HSVhsv(250, 73%, 49%)
CMYKcmyk(61.1%, 73%, 0%, 50.6%)
CIE-LABlab(21.22, 34.17, -49.66)
CIE-LCHlch(21.22, 60.29, 304.53°)
OKLaboklab(33.57% 0.0318 -0.1431)
OKLCHoklch(33.57% 0.147 282.5)
XYZxyz(5.6034, 3.3030, 20.0769)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31227E #6F7E22
analogous
#22417E #31227E #5F227E
triadic
#31227E #7E3122 #227E31
tetradic
#31227E #7E2241 #6F7E22 #227E5F
square
#31227E #7E2241 #6F7E22 #227E5F
split-complementary
#31227E #7E5F22 #417E22
monochromatic
#0C081E #1E154E #31227E #442FAE #614CCF

Accessibility & contrast

On white

12.65
#31227E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#31227E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31227E
12.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31227E#FFFFFF#000000##FFFFFF
##31227E1.0012.651.6612.65
#FFFFFF12.651.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003681
Deuteranopia (green-blind)
#00307C
Tritanopia (blue-blind)
#003B4D
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #31227e;
/* rgb */ color: rgb(49, 34, 126);
/* oklch */ color: oklch(33.6% 0.147 282.5);
Tailwind
colors: {
  custom: {
    50: '#735fa4',
    500: '#31227e',
    950: '#000000',
  },
}
SCSS
$custom: #31227e;
$custom-light: #735fa4;
$custom-dark: #000000;
JSON
{
  "hex": "#31227e",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 126
  },
  "hsl": {
    "h": 249.783,
    "s": 57.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.33566,
    "c": 0.14656,
    "h": 282.5
  },
  "luminance": 0.03303
}

Semantic roles & 50–950 ramp

primary
#31227E
secondary
#A0B14B
accent
#E147C8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31227E

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

Preview Lab → · Contrast checker → · Palette generator →

#31227E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva