#1F178B#1F178B

#1F178B is a dark, vivid blue. Relative luminance 0.028; OKLCH L 32.1% C 0.178 H 273.0°. Best body text is #FFFFFF at 13.52:1 contrast (WCAG AA passes).

Color values

HEX#1F178B
RGBrgb(31, 23, 139)
HSLhsl(244, 72%, 32%)
HSVhsv(244, 83%, 55%)
CMYKcmyk(77.7%, 83.5%, 0%, 45.5%)
CIE-LABlab(19.09, 42.51, -61.42)
CIE-LCHlch(19.09, 74.69, 304.68°)
OKLaboklab(32.12% 0.0092 -0.1777)
OKLCHoklch(32.12% 0.178 273)
XYZxyz(5.5301, 2.7676, 24.6638)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F178B #838B17
analogous
#17498B #1F178B #59178B
triadic
#1F178B #8B1F17 #178B1F
tetradic
#1F178B #8B1749 #838B17 #178B59
square
#1F178B #8B1749 #838B17 #178B59
split-complementary
#1F178B #8B5917 #498B17
monochromatic
#080622 #130E56 #1F178B #2B20C0 #493DDF

Accessibility & contrast

On white

13.52
#1F178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#1F178B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F178B
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F178B#FFFFFF#000000##FFFFFF
##1F178B1.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348E
Deuteranopia (green-blind)
#002989
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #1f178b;
/* rgb */ color: rgb(31, 23, 139);
/* oklch */ color: oklch(32.1% 0.178 273.0);
Tailwind
colors: {
  custom: {
    50: '#6f58ae',
    500: '#1f178b',
    950: '#000000',
  },
}
SCSS
$custom: #1f178b;
$custom-light: #6f58ae;
$custom-dark: #000000;
JSON
{
  "hex": "#1f178b",
  "rgb": {
    "r": 31,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 244.138,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.32123,
    "c": 0.17793,
    "h": 273
  },
  "luminance": 0.02768
}

Semantic roles & 50–950 ramp

primary
#1F178B
secondary
#B6BF3F
accent
#EE39E2
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090310
muted
#7B787F

Preview Lab

Preview with #1F178B

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

Preview Lab → · Contrast checker → · Palette generator →

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