#1F157A#1F157A

#1F157A is a dark, vivid blue. Relative luminance 0.022; OKLCH L 29.8% C 0.159 H 275.3°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#1F157A
RGBrgb(31, 21, 122)
HSLhsl(246, 71%, 28%)
HSVhsv(246, 83%, 48%)
CMYKcmyk(74.6%, 82.8%, 0%, 52.2%)
CIE-LABlab(16.66, 37.99, -54.68)
CIE-LCHlch(16.66, 66.58, 304.79°)
OKLaboklab(29.84% 0.0146 -0.1581)
OKLCHoklch(29.84% 0.159 275.3)
XYZxyz(4.3449, 2.2324, 18.6105)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F157A #707A15
analogous
#153D7A #1F157A #52157A
triadic
#1F157A #7A1F15 #157A1F
tetradic
#1F157A #7A153D #707A15 #157A52
square
#1F157A #7A153D #707A15 #157A52
split-complementary
#1F157A #7A5215 #3D7A15
monochromatic
#07041A #120C46 #1F157A #2C1EAE #3F2EDB

Accessibility & contrast

On white

14.52
#1F157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#1F157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F157A
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F157A#FFFFFF#000000##FFFFFF
##1F157A1.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D7D
Deuteranopia (green-blind)
#002578
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #1f157a;
/* rgb */ color: rgb(31, 21, 122);
/* oklch */ color: oklch(29.8% 0.159 275.3);
Tailwind
colors: {
  custom: {
    50: '#6b55a2',
    500: '#1f157a',
    950: '#000000',
  },
}
SCSS
$custom: #1f157a;
$custom-light: #6b55a2;
$custom-dark: #000000;
JSON
{
  "hex": "#1f157a",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 245.941,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.29835,
    "c": 0.15877,
    "h": 275.3
  },
  "luminance": 0.02233
}

Semantic roles & 50–950 ramp

primary
#1F157A
secondary
#A4AF3B
accent
#ED3ADC
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#08030F
muted
#7A787F

Preview Lab

Preview with #1F157A

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

Preview Lab → · Contrast checker → · Palette generator →

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