#1F228D#1F228D

#1F228D is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.8% C 0.170 H 271.6°. Best body text is #FFFFFF at 12.56:1 contrast (WCAG AA passes).

Color values

HEX#1F228D
RGBrgb(31, 34, 141)
HSLhsl(238, 64%, 34%)
HSVhsv(238, 78%, 55%)
CMYKcmyk(78%, 75.9%, 0%, 44.7%)
CIE-LABlab(21.42, 37.15, -58.80)
CIE-LCHlch(21.42, 69.55, 302.28°)
OKLaboklab(33.83% 0.0046 -0.1702)
OKLCHoklch(33.83% 0.17 271.6)
XYZxyz(5.9432, 3.3578, 25.5290)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F228D #8D8A1F
analogous
#1F598D #1F228D #531F8D
triadic
#1F228D #8D1F22 #228D1F
tetradic
#1F228D #8D1F59 #8D8A1F #1F8D53
square
#1F228D #8D1F59 #8D8A1F #1F8D53
split-complementary
#1F228D #8D531F #598D1F
monochromatic
#090A29 #14165B #1F228D #2A2EBF #4E52D8

Accessibility & contrast

On white

12.56
#1F228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#1F228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F228D
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F228D#FFFFFF#000000##FFFFFF
##1F228D1.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003990
Deuteranopia (green-blind)
#002E8B
Tritanopia (blue-blind)
#004156
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f228d;
/* rgb */ color: rgb(31, 34, 141);
/* oklch */ color: oklch(33.8% 0.170 271.6);
Tailwind
colors: {
  custom: {
    50: '#6f5eaf',
    500: '#1f228d',
    950: '#000000',
  },
}
SCSS
$custom: #1f228d;
$custom-light: #6f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#1f228d",
  "rgb": {
    "r": 31,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 238.364,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.33831,
    "c": 0.1703,
    "h": 271.6
  },
  "luminance": 0.03358
}

Semantic roles & 50–950 ramp

primary
#1F228D
secondary
#BBB84D
accent
#E241E7
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F228D

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

Preview Lab → · Contrast checker → · Palette generator →

#1F228D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva