#1F2787#1F2787

#1F2787 is a dark, vivid blue. Relative luminance 0.035; OKLCH L 34.0% C 0.157 H 271.1°. Best body text is #FFFFFF at 12.36:1 contrast (WCAG AA passes).

Color values

HEX#1F2787
RGBrgb(31, 39, 135)
HSLhsl(235, 63%, 33%)
HSVhsv(235, 77%, 53%)
CMYKcmyk(77%, 71.1%, 0%, 47.1%)
CIE-LABlab(21.91, 31.87, -54.25)
CIE-LCHlch(21.91, 62.92, 300.43°)
OKLaboklab(33.99% 0.003 -0.157)
OKLCHoklch(33.99% 0.157 271.1)
XYZxyz(5.6623, 3.4910, 23.2924)
Luminance0.0349 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F2787 #877F1F
analogous
#1F5B87 #1F2787 #4B1F87
triadic
#1F2787 #871F27 #27871F
tetradic
#1F2787 #871F5B #877F1F #1F874B
square
#1F2787 #871F5B #877F1F #1F874B
split-complementary
#1F2787 #874B1F #5B871F
monochromatic
#080A23 #141955 #1F2787 #2A35B9 #4B55D6

Accessibility & contrast

On white

12.36
#1F2787 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#1F2787 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F2787
12.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F2787#FFFFFF#000000##FFFFFF
##1F27871.0012.361.7012.36
#FFFFFF12.361.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398A
Deuteranopia (green-blind)
#002F85
Tritanopia (blue-blind)
#004154
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #1f2787;
/* rgb */ color: rgb(31, 39, 135);
/* oklch */ color: oklch(34.0% 0.157 271.1);
Tailwind
colors: {
  custom: {
    50: '#6d61ab',
    500: '#1f2787',
    950: '#000000',
  },
}
SCSS
$custom: #1f2787;
$custom-light: #6d61ab;
$custom-dark: #000000;
JSON
{
  "hex": "#1f2787",
  "rgb": {
    "r": 31,
    "g": 39,
    "b": 135
  },
  "hsl": {
    "h": 235.385,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33991,
    "c": 0.15701,
    "h": 271.1
  },
  "luminance": 0.03492
}

Semantic roles & 50–950 ramp

primary
#1F2787
secondary
#B8B04A
accent
#D942E6
background
#F7F5FA
surface
#EDEAF4
border
#C8C6CE
text
#080510
muted
#7B797F

Preview Lab

Preview with #1F2787

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

Preview Lab → · Contrast checker → · Palette generator →

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