#1F218A#1F218A

#1F218A is a dark, vivid blue. Relative luminance 0.032; OKLCH L 33.3% C 0.167 H 271.9°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#1F218A
RGBrgb(31, 33, 138)
HSLhsl(239, 63%, 33%)
HSVhsv(239, 78%, 54%)
CMYKcmyk(77.5%, 76.1%, 0%, 45.9%)
CIE-LABlab(20.88, 36.69, -57.83)
CIE-LCHlch(20.88, 68.49, 302.39°)
OKLaboklab(33.35% 0.0056 -0.1674)
OKLCHoklch(33.35% 0.167 271.9)
XYZxyz(5.6948, 3.2134, 24.3599)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F218A #8A881F
analogous
#1F568A #1F218A #531F8A
triadic
#1F218A #8A1F21 #218A1F
tetradic
#1F218A #8A1F56 #8A881F #1F8A53
square
#1F218A #8A1F56 #8A881F #1F8A53
split-complementary
#1F218A #8A531F #568A1F
monochromatic
#090926 #141558 #1F218A #2A2DBC #4C4FD7

Accessibility & contrast

On white

12.78
#1F218A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#1F218A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F218A
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F218A#FFFFFF#000000##FFFFFF
##1F218A1.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #1f218a;
/* rgb */ color: rgb(31, 33, 138);
/* oklch */ color: oklch(33.3% 0.167 271.9);
Tailwind
colors: {
  custom: {
    50: '#6e5ead',
    500: '#1f218a',
    950: '#000000',
  },
}
SCSS
$custom: #1f218a;
$custom-light: #6e5ead;
$custom-dark: #000000;
JSON
{
  "hex": "#1f218a",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 138
  },
  "hsl": {
    "h": 238.879,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.33346,
    "c": 0.16749,
    "h": 271.9
  },
  "luminance": 0.03214
}

Semantic roles & 50–950 ramp

primary
#1F218A
secondary
#BAB84B
accent
#E341E6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#080410
muted
#7B797F

Preview Lab

Preview with #1F218A

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

Preview Lab → · Contrast checker → · Palette generator →

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