#1F178E#1F178E

#1F178E is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.5% C 0.182 H 272.7°. Best body text is #FFFFFF at 13.36:1 contrast (WCAG AA passes).

Color values

HEX#1F178E
RGBrgb(31, 23, 142)
HSLhsl(244, 72%, 32%)
HSVhsv(244, 84%, 56%)
CMYKcmyk(78.2%, 83.8%, 0%, 44.3%)
CIE-LABlab(19.46, 43.46, -62.68)
CIE-LCHlch(19.46, 76.27, 304.74°)
OKLaboklab(32.49% 0.0084 -0.1813)
OKLCHoklch(32.49% 0.182 272.7)
XYZxyz(5.7523, 2.8565, 25.8341)
Luminance0.0286 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F178E #868E17
analogous
#174A8E #1F178E #5B178E
triadic
#1F178E #8E1F17 #178E1F
tetradic
#1F178E #8E174A #868E17 #178E5B
square
#1F178E #8E174A #868E17 #178E5B
split-complementary
#1F178E #8E5B17 #4A8E17
monochromatic
#080625 #140E59 #1F178E #2A20C3 #4A3FE0

Accessibility & contrast

On white

13.36
#1F178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#1F178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F178E
13.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F178E#FFFFFF#000000##FFFFFF
##1F178E1.0013.361.5713.36
#FFFFFF13.361.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003591
Deuteranopia (green-blind)
#00298C
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #1f178e;
/* rgb */ color: rgb(31, 23, 142);
/* oklch */ color: oklch(32.5% 0.182 272.7);
Tailwind
colors: {
  custom: {
    50: '#7058b0',
    500: '#1f178e',
    950: '#000000',
  },
}
SCSS
$custom: #1f178e;
$custom-light: #7058b0;
$custom-dark: #000000;
JSON
{
  "hex": "#1f178e",
  "rgb": {
    "r": 31,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 244.034,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.32488,
    "c": 0.18153,
    "h": 272.7
  },
  "luminance": 0.02857
}

Semantic roles & 50–950 ramp

primary
#1F178E
secondary
#B8C040
accent
#EF39E3
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090311
muted
#7B7880

Preview Lab

Preview with #1F178E

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

Preview Lab → · Contrast checker → · Palette generator →

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