#31228C#31228C

#31228C is a dark, vivid blue. Relative luminance 0.037; OKLCH L 35.0% C 0.165 H 280.1°. Best body text is #FFFFFF at 12.08:1 contrast (WCAG AA passes).

Color values

HEX#31228C
RGBrgb(49, 34, 140)
HSLhsl(248, 61%, 34%)
HSVhsv(248, 76%, 55%)
CMYKcmyk(65%, 75.7%, 0%, 45.1%)
CIE-LABlab(22.62, 38.75, -56.16)
CIE-LCHlch(22.62, 68.23, 304.60°)
OKLaboklab(34.99% 0.0288 -0.1621)
OKLCHoklch(34.99% 0.165 280.1)
XYZxyz(6.5708, 3.6900, 25.1718)
Luminance0.0369 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31228C #7D8C22
analogous
#22488C #31228C #66228C
triadic
#31228C #8C3122 #228C31
tetradic
#31228C #8C2248 #7D8C22 #228C66
square
#31228C #8C2248 #7D8C22 #228C66
split-complementary
#31228C #8C6622 #488C22
monochromatic
#0F0A2A #20165B #31228C #422EBD #6653D5

Accessibility & contrast

On white

12.08
#31228C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#31228C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31228C
12.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31228C#FFFFFF#000000##FFFFFF
##31228C1.0012.081.7412.08
#FFFFFF12.081.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.081.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: #31228c;
/* rgb */ color: rgb(49, 34, 140);
/* oklch */ color: oklch(35.0% 0.165 280.1);
Tailwind
colors: {
  custom: {
    50: '#765faf',
    500: '#31228c',
    950: '#000000',
  },
}
SCSS
$custom: #31228c;
$custom-light: #765faf;
$custom-dark: #000000;
JSON
{
  "hex": "#31228c",
  "rgb": {
    "r": 49,
    "g": 34,
    "b": 140
  },
  "hsl": {
    "h": 248.491,
    "s": 60.92,
    "l": 34.118
  },
  "oklch": {
    "l": 0.34985,
    "c": 0.1646,
    "h": 280.1
  },
  "luminance": 0.0369
}

Semantic roles & 50–950 ramp

primary
#31228C
secondary
#AAB951
accent
#E444CD
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0510
muted
#7C797F

Preview Lab

Preview with #31228C

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

Preview Lab → · Contrast checker → · Palette generator →

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