#1F2871#1F2871

#1F2871 is a dark, vivid blue. Relative luminance 0.030; OKLCH L 32.0% C 0.125 H 271.9°. Best body text is #FFFFFF at 13.12:1 contrast (WCAG AA passes).

Color values

HEX#1F2871
RGBrgb(31, 40, 113)
HSLhsl(233, 57%, 28%)
HSVhsv(233, 73%, 44%)
CMYKcmyk(72.6%, 64.6%, 0%, 55.7%)
CIE-LABlab(20.05, 22.84, -43.33)
CIE-LCHlch(20.05, 48.98, 297.79°)
OKLaboklab(31.98% 0.0041 -0.125)
OKLCHoklch(31.98% 0.125 271.9)
XYZxyz(4.3035, 3.0007, 15.9720)
Luminance0.0300 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F2871 #71681F
analogous
#1F5171 #1F2871 #3F1F71
triadic
#1F2871 #711F28 #28711F
tetradic
#1F2871 #711F51 #71681F #1F713F
square
#1F2871 #711F51 #71681F #1F713F
split-complementary
#1F2871 #713F1F #51711F
monochromatic
#070818 #121741 #1F2871 #2C39A1 #404FCB

Accessibility & contrast

On white

13.12
#1F2871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#1F2871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F2871
13.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F2871#FFFFFF#000000##FFFFFF
##1F28711.0013.121.6013.12
#FFFFFF13.121.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003473
Deuteranopia (green-blind)
#002D70
Tritanopia (blue-blind)
#003B48
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #1f2871;
/* rgb */ color: rgb(31, 40, 113);
/* oklch */ color: oklch(32.0% 0.125 271.9);
Tailwind
colors: {
  custom: {
    50: '#67619a',
    500: '#1f2871',
    950: '#000000',
  },
}
SCSS
$custom: #1f2871;
$custom-light: #67619a;
$custom-dark: #000000;
JSON
{
  "hex": "#1f2871",
  "rgb": {
    "r": 31,
    "g": 40,
    "b": 113
  },
  "hsl": {
    "h": 233.415,
    "s": 56.944,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31981,
    "c": 0.12509,
    "h": 271.9
  },
  "luminance": 0.03001
}

Semantic roles & 50–950 ramp

primary
#1F2871
secondary
#A59B47
accent
#CF48E0
background
#F6F5F9
surface
#EBEAF2
border
#C6C6CC
text
#07050E
muted
#7A797E

Preview Lab

Preview with #1F2871

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

Preview Lab → · Contrast checker → · Palette generator →

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