#1F218C#1F218C

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

Color values

HEX#1F218C
RGBrgb(31, 33, 140)
HSLhsl(239, 64%, 34%)
HSVhsv(239, 78%, 55%)
CMYKcmyk(77.9%, 76.4%, 0%, 45.1%)
CIE-LABlab(21.10, 37.39, -58.71)
CIE-LCHlch(21.10, 69.61, 302.49°)
OKLaboklab(33.57% 0.0052 -0.17)
OKLCHoklch(33.57% 0.17 271.8)
XYZxyz(5.8410, 3.2718, 25.1296)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F218C #8C8A1F
analogous
#1F578C #1F218C #531F8C
triadic
#1F218C #8C1F21 #218C1F
tetradic
#1F218C #8C1F57 #8C8A1F #1F8C53
square
#1F218C #8C1F57 #8C8A1F #1F8C53
split-complementary
#1F218C #8C531F #578C1F
monochromatic
#090928 #14155A #1F218C #2A2DBE #4E50D8

Accessibility & contrast

On white

12.69
#1F218C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F218C
12.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F218C#FFFFFF#000000##FFFFFF
##1F218C1.0012.691.6512.69
#FFFFFF12.691.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388F
Deuteranopia (green-blind)
#002D8A
Tritanopia (blue-blind)
#004055
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f218c;
/* rgb */ color: rgb(31, 33, 140);
/* oklch */ color: oklch(33.6% 0.170 271.8);
Tailwind
colors: {
  custom: {
    50: '#6f5eaf',
    500: '#1f218c',
    950: '#000000',
  },
}
SCSS
$custom: #1f218c;
$custom-light: #6f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#1f218c",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 140
  },
  "hsl": {
    "h": 238.899,
    "s": 63.743,
    "l": 33.529
  },
  "oklch": {
    "l": 0.3357,
    "c": 0.17004,
    "h": 271.8
  },
  "luminance": 0.03272
}

Semantic roles & 50–950 ramp

primary
#1F218C
secondary
#BBB94C
accent
#E441E7
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090410
muted
#7B797F

Preview Lab

Preview with #1F218C

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

Preview Lab → · Contrast checker → · Palette generator →

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