#1F218B#1F218B

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

Color values

HEX#1F218B
RGBrgb(31, 33, 139)
HSLhsl(239, 64%, 33%)
HSVhsv(239, 78%, 55%)
CMYKcmyk(77.7%, 76.3%, 0%, 45.5%)
CIE-LABlab(20.99, 37.04, -58.27)
CIE-LCHlch(20.99, 69.05, 302.44°)
OKLaboklab(33.46% 0.0054 -0.1687)
OKLCHoklch(33.46% 0.169 271.8)
XYZxyz(5.7676, 3.2425, 24.7430)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F218B #8B891F
analogous
#1F578B #1F218B #531F8B
triadic
#1F218B #8B1F21 #218B1F
tetradic
#1F218B #8B1F57 #8B891F #1F8B53
square
#1F218B #8B1F57 #8B891F #1F8B53
split-complementary
#1F218B #8B531F #578B1F
monochromatic
#090927 #141559 #1F218B #2A2DBD #4D50D7

Accessibility & contrast

On white

12.74
#1F218B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F218B
12.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F218B#FFFFFF#000000##FFFFFF
##1F218B1.0012.741.6512.74
#FFFFFF12.741.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.741.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #1f218b;
/* rgb */ color: rgb(31, 33, 139);
/* oklch */ color: oklch(33.5% 0.169 271.8);
Tailwind
colors: {
  custom: {
    50: '#6e5eae',
    500: '#1f218b',
    950: '#000000',
  },
}
SCSS
$custom: #1f218b;
$custom-light: #6e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#1f218b",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 139
  },
  "hsl": {
    "h": 238.889,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.33458,
    "c": 0.16877,
    "h": 271.8
  },
  "luminance": 0.03243
}

Semantic roles & 50–950 ramp

primary
#1F218B
secondary
#BAB84C
accent
#E341E7
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#080410
muted
#7B797F

Preview Lab

Preview with #1F218B

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

Preview Lab → · Contrast checker → · Palette generator →

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