#1F277E#1F277E

#1F277E is a dark, vivid blue. Relative luminance 0.032; OKLCH L 33.1% C 0.145 H 271.6°. Best body text is #FFFFFF at 12.73:1 contrast (WCAG AA passes).

Color values

HEX#1F277E
RGBrgb(31, 39, 126)
HSLhsl(235, 61%, 31%)
HSVhsv(235, 75%, 49%)
CMYKcmyk(75.4%, 69%, 0%, 50.6%)
CIE-LABlab(21.01, 28.50, -50.06)
CIE-LCHlch(21.01, 57.60, 299.66°)
OKLaboklab(33.07% 0.0039 -0.1447)
OKLCHoklch(33.07% 0.145 271.6)
XYZxyz(5.0552, 3.2482, 20.0952)
Luminance0.0325 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F277E #7E761F
analogous
#1F567E #1F277E #461F7E
triadic
#1F277E #7E1F27 #277E1F
tetradic
#1F277E #7E1F56 #7E761F #1F7E46
square
#1F277E #7E1F56 #7E761F #1F7E46
split-complementary
#1F277E #7E461F #567E1F
monochromatic
#07091C #13184D #1F277E #2B36AF #4652D1

Accessibility & contrast

On white

12.73
#1F277E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#1F277E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F277E
12.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F277E#FFFFFF#000000##FFFFFF
##1F277E1.0012.731.6512.73
#FFFFFF12.731.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#002E7C
Tritanopia (blue-blind)
#003E4F
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #1f277e;
/* rgb */ color: rgb(31, 39, 126);
/* oklch */ color: oklch(33.1% 0.145 271.6);
Tailwind
colors: {
  custom: {
    50: '#6a61a4',
    500: '#1f277e',
    950: '#000000',
  },
}
SCSS
$custom: #1f277e;
$custom-light: #6a61a4;
$custom-dark: #000000;
JSON
{
  "hex": "#1f277e",
  "rgb": {
    "r": 31,
    "g": 39,
    "b": 126
  },
  "hsl": {
    "h": 234.947,
    "s": 60.51,
    "l": 30.784
  },
  "oklch": {
    "l": 0.33065,
    "c": 0.14479,
    "h": 271.6
  },
  "luminance": 0.03249
}

Semantic roles & 50–950 ramp

primary
#1F277E
secondary
#B1A848
accent
#D644E4
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#07050F
muted
#7A797F

Preview Lab

Preview with #1F277E

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

Preview Lab → · Contrast checker → · Palette generator →

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