#1F157D#1F157D

#1F157D is a dark, vivid blue. Relative luminance 0.023; OKLCH L 30.2% C 0.162 H 274.8°. Best body text is #FFFFFF at 14.37:1 contrast (WCAG AA passes).

Color values

HEX#1F157D
RGBrgb(31, 21, 125)
HSLhsl(246, 71%, 29%)
HSVhsv(246, 83%, 49%)
CMYKcmyk(75.2%, 83.2%, 0%, 51%)
CIE-LABlab(17.03, 38.98, -55.99)
CIE-LCHlch(17.03, 68.22, 304.84°)
OKLaboklab(30.2% 0.0137 -0.1619)
OKLCHoklch(30.2% 0.162 274.8)
XYZxyz(4.5337, 2.3079, 19.6046)
Luminance0.0231 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F157D #737D15
analogous
#153F7D #1F157D #53157D
triadic
#1F157D #7D1F15 #157D1F
tetradic
#1F157D #7D153F #737D15 #157D53
square
#1F157D #7D153F #737D15 #157D53
split-complementary
#1F157D #7D5315 #3F7D15
monochromatic
#06041A #120C49 #1F157D #2C1EB1 #4130DC

Accessibility & contrast

On white

14.37
#1F157D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#1F157D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F157D
14.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F157D#FFFFFF#000000##FFFFFF
##1F157D1.0014.371.4614.37
#FFFFFF14.371.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E80
Deuteranopia (green-blind)
#00257B
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #1f157d;
/* rgb */ color: rgb(31, 21, 125);
/* oklch */ color: oklch(30.2% 0.162 274.8);
Tailwind
colors: {
  custom: {
    50: '#6c56a4',
    500: '#1f157d',
    950: '#000000',
  },
}
SCSS
$custom: #1f157d;
$custom-light: #6c56a4;
$custom-dark: #000000;
JSON
{
  "hex": "#1f157d",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 125
  },
  "hsl": {
    "h": 245.769,
    "s": 71.233,
    "l": 28.627
  },
  "oklch": {
    "l": 0.30195,
    "c": 0.16249,
    "h": 274.8
  },
  "luminance": 0.02308
}

Semantic roles & 50–950 ramp

primary
#1F157D
secondary
#A7B23C
accent
#EE3ADD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #1F157D

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

Preview Lab → · Contrast checker → · Palette generator →

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