#1F157E#1F157E

#1F157E is a dark, vivid blue. Relative luminance 0.023; OKLCH L 30.3% C 0.164 H 274.7°. Best body text is #FFFFFF at 14.32:1 contrast (WCAG AA passes).

Color values

HEX#1F157E
RGBrgb(31, 21, 126)
HSLhsl(246, 71%, 29%)
HSVhsv(246, 83%, 49%)
CMYKcmyk(75.4%, 83.3%, 0%, 50.6%)
CIE-LABlab(17.15, 39.30, -56.43)
CIE-LCHlch(17.15, 68.77, 304.86°)
OKLaboklab(30.32% 0.0134 -0.1632)
OKLCHoklch(30.32% 0.164 274.7)
XYZxyz(4.5979, 2.3335, 19.9427)
Luminance0.0233 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F157E #747E15
analogous
#15407E #1F157E #54157E
triadic
#1F157E #7E1F15 #157E1F
tetradic
#1F157E #7E1540 #747E15 #157E54
square
#1F157E #7E1540 #747E15 #157E54
split-complementary
#1F157E #7E5415 #407E15
monochromatic
#06041A #120C4A #1F157E #2C1EB2 #4131DD

Accessibility & contrast

On white

14.32
#1F157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#1F157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F157E
14.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F157E#FFFFFF#000000##FFFFFF
##1F157E1.0014.321.4714.32
#FFFFFF14.321.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F81
Deuteranopia (green-blind)
#00257C
Tritanopia (blue-blind)
#00364A
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #1f157e;
/* rgb */ color: rgb(31, 21, 126);
/* oklch */ color: oklch(30.3% 0.164 274.7);
Tailwind
colors: {
  custom: {
    50: '#6c56a5',
    500: '#1f157e',
    950: '#000000',
  },
}
SCSS
$custom: #1f157e;
$custom-light: #6c56a5;
$custom-dark: #000000;
JSON
{
  "hex": "#1f157e",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 245.714,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.30315,
    "c": 0.16373,
    "h": 274.7
  },
  "luminance": 0.02334
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #1F157E

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

Preview Lab → · Contrast checker → · Palette generator →

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