#1F228B#1F228B

#1F228B is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.6% C 0.168 H 271.7°. Best body text is #FFFFFF at 12.65:1 contrast (WCAG AA passes).

Color values

HEX#1F228B
RGBrgb(31, 34, 139)
HSLhsl(238, 64%, 33%)
HSVhsv(238, 78%, 55%)
CMYKcmyk(77.7%, 75.5%, 0%, 45.5%)
CIE-LABlab(21.20, 36.44, -57.92)
CIE-LCHlch(21.20, 68.43, 302.18°)
OKLaboklab(33.61% 0.005 -0.1677)
OKLCHoklch(33.61% 0.168 271.7)
XYZxyz(5.7957, 3.2988, 24.7524)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F228B #8B881F
analogous
#1F588B #1F228B #521F8B
triadic
#1F228B #8B1F22 #228B1F
tetradic
#1F228B #8B1F58 #8B881F #1F8B52
square
#1F228B #8B1F58 #8B881F #1F8B52
split-complementary
#1F228B #8B521F #588B1F
monochromatic
#090A27 #141659 #1F228B #2A2EBD #4D51D7

Accessibility & contrast

On white

12.65
#1F228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#1F228B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F228B
12.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F228B#FFFFFF#000000##FFFFFF
##1F228B1.0012.651.6612.65
#FFFFFF12.651.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.651.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #1f228b;
/* rgb */ color: rgb(31, 34, 139);
/* oklch */ color: oklch(33.6% 0.168 271.7);
Tailwind
colors: {
  custom: {
    50: '#6e5eae',
    500: '#1f228b',
    950: '#000000',
  },
}
SCSS
$custom: #1f228b;
$custom-light: #6e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#1f228b",
  "rgb": {
    "r": 31,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 238.333,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.33609,
    "c": 0.16774,
    "h": 271.7
  },
  "luminance": 0.03299
}

Semantic roles & 50–950 ramp

primary
#1F228B
secondary
#BAB74C
accent
#E241E7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#080410
muted
#7B797F

Preview Lab

Preview with #1F228B

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

Preview Lab → · Contrast checker → · Palette generator →

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