#1F178A#1F178A

#1F178A is a dark, vivid blue. Relative luminance 0.027; OKLCH L 32.0% C 0.177 H 273.1°. Best body text is #FFFFFF at 13.57:1 contrast (WCAG AA passes).

Color values

HEX#1F178A
RGBrgb(31, 23, 138)
HSLhsl(244, 71%, 32%)
HSVhsv(244, 83%, 54%)
CMYKcmyk(77.5%, 83.3%, 0%, 45.9%)
CIE-LABlab(18.96, 42.18, -61.00)
CIE-LCHlch(18.96, 74.16, 304.67°)
OKLaboklab(32% 0.0095 -0.1765)
OKLCHoklch(32% 0.177 273.1)
XYZxyz(5.4574, 2.7385, 24.2808)
Luminance0.0274 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F178A #828A17
analogous
#17498A #1F178A #59178A
triadic
#1F178A #8A1F17 #178A1F
tetradic
#1F178A #8A1749 #828A17 #178A59
square
#1F178A #8A1749 #828A17 #178A59
split-complementary
#1F178A #8A5917 #498A17
monochromatic
#070621 #130E56 #1F178A #2B20BE #483DDF

Accessibility & contrast

On white

13.57
#1F178A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F178A
13.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F178A#FFFFFF#000000##FFFFFF
##1F178A1.0013.571.5513.57
#FFFFFF13.571.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00338D
Deuteranopia (green-blind)
#002888
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #1f178a;
/* rgb */ color: rgb(31, 23, 138);
/* oklch */ color: oklch(32.0% 0.177 273.1);
Tailwind
colors: {
  custom: {
    50: '#6f58ad',
    500: '#1f178a',
    950: '#000000',
  },
}
SCSS
$custom: #1f178a;
$custom-light: #6f58ad;
$custom-dark: #000000;
JSON
{
  "hex": "#1f178a",
  "rgb": {
    "r": 31,
    "g": 23,
    "b": 138
  },
  "hsl": {
    "h": 244.174,
    "s": 71.429,
    "l": 31.569
  },
  "oklch": {
    "l": 0.32002,
    "c": 0.17672,
    "h": 273.1
  },
  "luminance": 0.02739
}

Semantic roles & 50–950 ramp

primary
#1F178A
secondary
#B5BE3F
accent
#EE3AE2
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #1F178A

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

Preview Lab → · Contrast checker → · Palette generator →

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