#1F228F#1F228F

#1F228F is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.1% C 0.173 H 271.4°. Best body text is #FFFFFF at 12.47:1 contrast (WCAG AA passes).

Color values

HEX#1F228F
RGBrgb(31, 34, 143)
HSLhsl(238, 64%, 34%)
HSVhsv(238, 78%, 56%)
CMYKcmyk(78.3%, 76.2%, 0%, 43.9%)
CIE-LABlab(21.65, 37.85, -59.68)
CIE-LCHlch(21.65, 70.67, 302.38°)
OKLaboklab(34.06% 0.0043 -0.1728)
OKLCHoklch(34.06% 0.173 271.4)
XYZxyz(6.0933, 3.4179, 26.3199)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F228F #8F8C1F
analogous
#1F5A8F #1F228F #541F8F
triadic
#1F228F #8F1F22 #228F1F
tetradic
#1F228F #8F1F5A #8F8C1F #1F8F54
square
#1F228F #8F1F5A #8F8C1F #1F8F54
split-complementary
#1F228F #8F541F #5A8F1F
monochromatic
#090A2A #14165D #1F228F #2A2EC1 #4F53D9

Accessibility & contrast

On white

12.47
#1F228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F228F
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F228F#FFFFFF#000000##FFFFFF
##1F228F1.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#002E8D
Tritanopia (blue-blind)
#004257
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #1f228f;
/* rgb */ color: rgb(31, 34, 143);
/* oklch */ color: oklch(34.1% 0.173 271.4);
Tailwind
colors: {
  custom: {
    50: '#6f5eb1',
    500: '#1f228f',
    950: '#000000',
  },
}
SCSS
$custom: #1f228f;
$custom-light: #6f5eb1;
$custom-dark: #000000;
JSON
{
  "hex": "#1f228f",
  "rgb": {
    "r": 31,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 238.393,
    "s": 64.368,
    "l": 34.118
  },
  "oklch": {
    "l": 0.34055,
    "c": 0.17284,
    "h": 271.4
  },
  "luminance": 0.03419
}

Semantic roles & 50–950 ramp

primary
#1F228F
secondary
#BCB94E
accent
#E340E7
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F228F

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

Preview Lab → · Contrast checker → · Palette generator →

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