#1F228E#1F228E

#1F228E is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.9% C 0.172 H 271.5°. Best body text is #FFFFFF at 12.52:1 contrast (WCAG AA passes).

Color values

HEX#1F228E
RGBrgb(31, 34, 142)
HSLhsl(238, 64%, 34%)
HSVhsv(238, 78%, 56%)
CMYKcmyk(78.2%, 76.1%, 0%, 44.3%)
CIE-LABlab(21.53, 37.50, -59.24)
CIE-LCHlch(21.53, 70.11, 302.33°)
OKLaboklab(33.94% 0.0044 -0.1715)
OKLCHoklch(33.94% 0.172 271.5)
XYZxyz(6.0179, 3.3877, 25.9227)
Luminance0.0339 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F228E #8E8B1F
analogous
#1F5A8E #1F228E #541F8E
triadic
#1F228E #8E1F22 #228E1F
tetradic
#1F228E #8E1F5A #8E8B1F #1F8E54
square
#1F228E #8E1F5A #8E8B1F #1F8E54
split-complementary
#1F228E #8E541F #5A8E1F
monochromatic
#090A2A #14165C #1F228E #2A2EC0 #4F53D9

Accessibility & contrast

On white

12.52
#1F228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#1F228E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F228E
12.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F228E#FFFFFF#000000##FFFFFF
##1F228E1.0012.521.6812.52
#FFFFFF12.521.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003991
Deuteranopia (green-blind)
#002E8C
Tritanopia (blue-blind)
#004256
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #1f228e;
/* rgb */ color: rgb(31, 34, 142);
/* oklch */ color: oklch(33.9% 0.172 271.5);
Tailwind
colors: {
  custom: {
    50: '#6f5eb0',
    500: '#1f228e',
    950: '#000000',
  },
}
SCSS
$custom: #1f228e;
$custom-light: #6f5eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#1f228e",
  "rgb": {
    "r": 31,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 238.378,
    "s": 64.162,
    "l": 33.922
  },
  "oklch": {
    "l": 0.33943,
    "c": 0.17157,
    "h": 271.5
  },
  "luminance": 0.03388
}

Semantic roles & 50–950 ramp

primary
#1F228E
secondary
#BBB84D
accent
#E341E7
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F228E

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

Preview Lab → · Contrast checker → · Palette generator →

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