#1F178F#1F178F

#1F178F is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.6% C 0.183 H 272.6°. Best body text is #FFFFFF at 13.31:1 contrast (WCAG AA passes).

Color values

HEX#1F178F
RGBrgb(31, 23, 143)
HSLhsl(244, 72%, 33%)
HSVhsv(244, 84%, 56%)
CMYKcmyk(78.3%, 83.9%, 0%, 43.9%)
CIE-LABlab(19.58, 43.78, -63.10)
CIE-LCHlch(19.58, 76.80, 304.76°)
OKLaboklab(32.61% 0.0082 -0.1825)
OKLCHoklch(32.61% 0.183 272.6)
XYZxyz(5.8277, 2.8866, 26.2313)
Luminance0.0289 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F178F #878F17
analogous
#174B8F #1F178F #5B178F
triadic
#1F178F #8F1F17 #178F1F
tetradic
#1F178F #8F174B #878F17 #178F5B
square
#1F178F #8F174B #878F17 #178F5B
split-complementary
#1F178F #8F5B17 #4B8F17
monochromatic
#080626 #140F5A #1F178F #2A1FC4 #4B40E0

Accessibility & contrast

On white

13.31
#1F178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#1F178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F178F
13.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F178F#FFFFFF#000000##FFFFFF
##1F178F1.0013.311.5813.31
#FFFFFF13.311.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003592
Deuteranopia (green-blind)
#00298D
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #1f178f;
/* rgb */ color: rgb(31, 23, 143);
/* oklch */ color: oklch(32.6% 0.183 272.6);
Tailwind
colors: {
  custom: {
    50: '#7058b1',
    500: '#1f178f',
    950: '#000000',
  },
}
SCSS
$custom: #1f178f;
$custom-light: #7058b1;
$custom-dark: #000000;
JSON
{
  "hex": "#1f178f",
  "rgb": {
    "r": 31,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 244,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.3261,
    "c": 0.18272,
    "h": 272.6
  },
  "luminance": 0.02887
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #1F178F

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

Preview Lab → · Contrast checker → · Palette generator →

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