#1F218D#1F218D

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

Color values

HEX#1F218D
RGBrgb(31, 33, 141)
HSLhsl(239, 64%, 34%)
HSVhsv(239, 78%, 55%)
CMYKcmyk(78%, 76.6%, 0%, 44.7%)
CIE-LABlab(21.21, 37.74, -59.15)
CIE-LCHlch(21.21, 70.16, 302.54°)
OKLaboklab(33.68% 0.0051 -0.1712)
OKLCHoklch(33.68% 0.171 271.7)
XYZxyz(5.9150, 3.3015, 25.5196)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F218D #8D8B1F
analogous
#1F588D #1F218D #541F8D
triadic
#1F218D #8D1F21 #218D1F
tetradic
#1F218D #8D1F58 #8D8B1F #1F8D54
square
#1F218D #8D1F58 #8D8B1F #1F8D54
split-complementary
#1F218D #8D541F #588D1F
monochromatic
#090A29 #14155B #1F218D #2A2DBF #4E51D8

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##1F218D#FFFFFF#000000##FFFFFF
##1F218D1.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)
#003890
Deuteranopia (green-blind)
#002D8B
Tritanopia (blue-blind)
#004155
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f218d;
/* rgb */ color: rgb(31, 33, 141);
/* oklch */ color: oklch(33.7% 0.171 271.7);
Tailwind
colors: {
  custom: {
    50: '#6f5eb0',
    500: '#1f218d',
    950: '#000000',
  },
}
SCSS
$custom: #1f218d;
$custom-light: #6f5eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#1f218d",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 141
  },
  "hsl": {
    "h": 238.909,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.33682,
    "c": 0.17131,
    "h": 271.7
  },
  "luminance": 0.03302
}

Semantic roles & 50–950 ramp

primary
#1F218D
secondary
#BBB94D
accent
#E441E7
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F218D

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

Preview Lab → · Contrast checker → · Palette generator →

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