#1F228A#1F228A

#1F228A is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.5% C 0.166 H 271.8°. Best body text is #FFFFFF at 12.70:1 contrast (WCAG AA passes).

Color values

HEX#1F228A
RGBrgb(31, 34, 138)
HSLhsl(238, 63%, 33%)
HSVhsv(238, 78%, 54%)
CMYKcmyk(77.5%, 75.4%, 0%, 45.9%)
CIE-LABlab(21.09, 36.09, -57.48)
CIE-LCHlch(21.09, 67.87, 302.13°)
OKLaboklab(33.5% 0.0051 -0.1664)
OKLCHoklch(33.5% 0.166 271.8)
XYZxyz(5.7230, 3.2697, 24.3693)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F228A #8A871F
analogous
#1F578A #1F228A #511F8A
triadic
#1F228A #8A1F22 #228A1F
tetradic
#1F228A #8A1F57 #8A871F #1F8A51
square
#1F228A #8A1F57 #8A871F #1F8A51
split-complementary
#1F228A #8A511F #578A1F
monochromatic
#090926 #141658 #1F228A #2A2EBC #4C50D7

Accessibility & contrast

On white

12.70
#1F228A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#1F228A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F228A
12.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F228A#FFFFFF#000000##FFFFFF
##1F228A1.0012.701.6512.70
#FFFFFF12.701.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388D
Deuteranopia (green-blind)
#002D88
Tritanopia (blue-blind)
#004054
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f228a;
/* rgb */ color: rgb(31, 34, 138);
/* oklch */ color: oklch(33.5% 0.166 271.8);
Tailwind
colors: {
  custom: {
    50: '#6e5ead',
    500: '#1f228a',
    950: '#000000',
  },
}
SCSS
$custom: #1f228a;
$custom-light: #6e5ead;
$custom-dark: #000000;
JSON
{
  "hex": "#1f228a",
  "rgb": {
    "r": 31,
    "g": 34,
    "b": 138
  },
  "hsl": {
    "h": 238.318,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.33499,
    "c": 0.16645,
    "h": 271.8
  },
  "luminance": 0.0327
}

Semantic roles & 50–950 ramp

primary
#1F228A
secondary
#BAB74B
accent
#E241E6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#080410
muted
#7B797F

Preview Lab

Preview with #1F228A

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

Preview Lab → · Contrast checker → · Palette generator →

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