#1F157B#1F157B

#1F157B is a dark, vivid blue. Relative luminance 0.023; OKLCH L 30.0% C 0.160 H 275.1°. Best body text is #FFFFFF at 14.47:1 contrast (WCAG AA passes).

Color values

HEX#1F157B
RGBrgb(31, 21, 123)
HSLhsl(246, 71%, 28%)
HSVhsv(246, 83%, 48%)
CMYKcmyk(74.8%, 82.9%, 0%, 51.8%)
CIE-LABlab(16.78, 38.32, -55.12)
CIE-LCHlch(16.78, 67.13, 304.81°)
OKLaboklab(29.96% 0.0143 -0.1594)
OKLCHoklch(29.96% 0.16 275.1)
XYZxyz(4.4072, 2.2573, 18.9385)
Luminance0.0226 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F157B #717B15
analogous
#153E7B #1F157B #52157B
triadic
#1F157B #7B1F15 #157B1F
tetradic
#1F157B #7B153E #717B15 #157B52
square
#1F157B #7B153E #717B15 #157B52
split-complementary
#1F157B #7B5215 #3E7B15
monochromatic
#07041A #120C47 #1F157B #2C1EAF #402FDB

Accessibility & contrast

On white

14.47
#1F157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F157B
14.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F157B#FFFFFF#000000##FFFFFF
##1F157B1.0014.471.4514.47
#FFFFFF14.471.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E7E
Deuteranopia (green-blind)
#002579
Tritanopia (blue-blind)
#003548
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #1f157b;
/* rgb */ color: rgb(31, 21, 123);
/* oklch */ color: oklch(30.0% 0.160 275.1);
Tailwind
colors: {
  custom: {
    50: '#6b55a2',
    500: '#1f157b',
    950: '#000000',
  },
}
SCSS
$custom: #1f157b;
$custom-light: #6b55a2;
$custom-dark: #000000;
JSON
{
  "hex": "#1f157b",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 245.882,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.29955,
    "c": 0.16002,
    "h": 275.1
  },
  "luminance": 0.02258
}

Semantic roles & 50–950 ramp

primary
#1F157B
secondary
#A5B03B
accent
#EE3ADC
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #1F157B

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

Preview Lab → · Contrast checker → · Palette generator →

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