#1F2797#1F2797

#1F2797 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.7% C 0.178 H 270.3°. Best body text is #FFFFFF at 11.70:1 contrast (WCAG AA passes).

Color values

HEX#1F2797
RGBrgb(31, 39, 151)
HSLhsl(236, 66%, 36%)
HSVhsv(236, 79%, 59%)
CMYKcmyk(79.5%, 74.2%, 0%, 40.8%)
CIE-LABlab(23.59, 37.67, -61.41)
CIE-LCHlch(23.59, 72.05, 301.53°)
OKLaboklab(35.7% 0.0008 -0.1779)
OKLCHoklch(35.7% 0.178 270.3)
XYZxyz(6.8746, 3.9759, 29.6773)
Luminance0.0398 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F2797 #978F1F
analogous
#1F6397 #1F2797 #531F97
triadic
#1F2797 #971F27 #27971F
tetradic
#1F2797 #971F63 #978F1F #1F9753
square
#1F2797 #971F63 #978F1F #1F9753
split-complementary
#1F2797 #97531F #63971F
monochromatic
#0A0D31 #151A64 #1F2797 #2934CA #545DDC

Accessibility & contrast

On white

11.70
#1F2797 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#1F2797 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F2797
11.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F2797#FFFFFF#000000##FFFFFF
##1F27971.0011.701.8011.70
#FFFFFF11.701.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9A
Deuteranopia (green-blind)
#003295
Tritanopia (blue-blind)
#00475C
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #1f2797;
/* rgb */ color: rgb(31, 39, 151);
/* oklch */ color: oklch(35.7% 0.178 270.3);
Tailwind
colors: {
  custom: {
    50: '#7162b7',
    500: '#1f2797',
    950: '#000000',
  },
}
SCSS
$custom: #1f2797;
$custom-light: #7162b7;
$custom-dark: #000000;
JSON
{
  "hex": "#1f2797",
  "rgb": {
    "r": 31,
    "g": 39,
    "b": 151
  },
  "hsl": {
    "h": 236,
    "s": 65.934,
    "l": 35.686
  },
  "oklch": {
    "l": 0.35701,
    "c": 0.17786,
    "h": 270.3
  },
  "luminance": 0.03977
}

Semantic roles & 50–950 ramp

primary
#1F2797
secondary
#BFB852
accent
#DE3FE9
background
#F7F5FB
surface
#EDEAF6
border
#C8C6D0
text
#090511
muted
#7B7980

Preview Lab

Preview with #1F2797

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

Preview Lab → · Contrast checker → · Palette generator →

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