#1F217E#1F217E

#1F217E is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.0% C 0.152 H 272.9°. Best body text is #FFFFFF at 13.32:1 contrast (WCAG AA passes).

Color values

HEX#1F217E
RGBrgb(31, 33, 126)
HSLhsl(239, 61%, 31%)
HSVhsv(239, 75%, 49%)
CMYKcmyk(75.4%, 73.8%, 0%, 50.6%)
CIE-LABlab(19.58, 32.41, -52.42)
CIE-LCHlch(19.58, 61.62, 301.73°)
OKLaboklab(32.03% 0.0077 -0.1516)
OKLCHoklch(32.03% 0.152 272.9)
XYZxyz(4.8736, 2.8849, 20.0346)
Luminance0.0289 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F217E #7E7C1F
analogous
#1F507E #1F217E #4C1F7E
triadic
#1F217E #7E1F21 #217E1F
tetradic
#1F217E #7E1F50 #7E7C1F #1F7E4C
square
#1F217E #7E1F50 #7E7C1F #1F7E4C
split-complementary
#1F217E #7E4C1F #507E1F
monochromatic
#07071C #13144D #1F217E #2B2EAF #4649D1

Accessibility & contrast

On white

13.32
#1F217E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#1F217E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F217E
13.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F217E#FFFFFF#000000##FFFFFF
##1F217E1.0013.321.5813.32
#FFFFFF13.321.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003481
Deuteranopia (green-blind)
#002B7C
Tritanopia (blue-blind)
#003B4D
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #1f217e;
/* rgb */ color: rgb(31, 33, 126);
/* oklch */ color: oklch(32.0% 0.152 272.9);
Tailwind
colors: {
  custom: {
    50: '#6b5da4',
    500: '#1f217e',
    950: '#000000',
  },
}
SCSS
$custom: #1f217e;
$custom-light: #6b5da4;
$custom-dark: #000000;
JSON
{
  "hex": "#1f217e",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 126
  },
  "hsl": {
    "h": 238.737,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.32028,
    "c": 0.15182,
    "h": 272.9
  },
  "luminance": 0.02885
}

Semantic roles & 50–950 ramp

primary
#1F217E
secondary
#B1AF48
accent
#E044E4
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#08040F
muted
#7A797F

Preview Lab

Preview with #1F217E

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

Preview Lab → · Contrast checker → · Palette generator →

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