#1F218F#1F218F

#1F218F is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.9% C 0.174 H 271.5°. Best body text is #FFFFFF at 12.56:1 contrast (WCAG AA passes).

Color values

HEX#1F218F
RGBrgb(31, 33, 143)
HSLhsl(239, 64%, 34%)
HSVhsv(239, 78%, 56%)
CMYKcmyk(78.3%, 76.9%, 0%, 43.9%)
CIE-LABlab(21.44, 38.44, -60.02)
CIE-LCHlch(21.44, 71.28, 302.63°)
OKLaboklab(33.91% 0.0047 -0.1738)
OKLCHoklch(33.91% 0.174 271.5)
XYZxyz(6.0652, 3.3615, 26.3105)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F218F #8F8D1F
analogous
#1F598F #1F218F #551F8F
triadic
#1F218F #8F1F21 #218F1F
tetradic
#1F218F #8F1F59 #8F8D1F #1F8F55
square
#1F218F #8F1F59 #8F8D1F #1F8F55
split-complementary
#1F218F #8F551F #598F1F
monochromatic
#090A2A #14155D #1F218F #2A2DC1 #4F52D9

Accessibility & contrast

On white

12.56
#1F218F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#1F218F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F218F
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F218F#FFFFFF#000000##FFFFFF
##1F218F1.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#002E8D
Tritanopia (blue-blind)
#004156
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f218f;
/* rgb */ color: rgb(31, 33, 143);
/* oklch */ color: oklch(33.9% 0.174 271.5);
Tailwind
colors: {
  custom: {
    50: '#6f5eb1',
    500: '#1f218f',
    950: '#000000',
  },
}
SCSS
$custom: #1f218f;
$custom-light: #6f5eb1;
$custom-dark: #000000;
JSON
{
  "hex": "#1f218f",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 143
  },
  "hsl": {
    "h": 238.929,
    "s": 64.368,
    "l": 34.118
  },
  "oklch": {
    "l": 0.33907,
    "c": 0.17384,
    "h": 271.5
  },
  "luminance": 0.03362
}

Semantic roles & 50–950 ramp

primary
#1F218F
secondary
#BCBA4E
accent
#E440E7
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F218F

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

Preview Lab → · Contrast checker → · Palette generator →

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