#1F157F#1F157F

#1F157F is a dark, vivid blue. Relative luminance 0.024; OKLCH L 30.4% C 0.165 H 274.6°. Best body text is #FFFFFF at 14.27:1 contrast (WCAG AA passes).

Color values

HEX#1F157F
RGBrgb(31, 21, 127)
HSLhsl(246, 72%, 29%)
HSVhsv(246, 83%, 50%)
CMYKcmyk(75.6%, 83.5%, 0%, 50.2%)
CIE-LABlab(17.27, 39.63, -56.86)
CIE-LCHlch(17.27, 69.31, 304.87°)
OKLaboklab(30.44% 0.0132 -0.1644)
OKLCHoklch(30.44% 0.165 274.6)
XYZxyz(4.6627, 2.3595, 20.2842)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F157F #757F15
analogous
#15407F #1F157F #54157F
triadic
#1F157F #7F1F15 #157F1F
tetradic
#1F157F #7F1540 #757F15 #157F54
square
#1F157F #7F1540 #757F15 #157F54
split-complementary
#1F157F #7F5415 #407F15
monochromatic
#06041A #120C4A #1F157F #2C1EB4 #4231DD

Accessibility & contrast

On white

14.27
#1F157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #1F157F
14.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F157F#FFFFFF#000000##FFFFFF
##1F157F1.0014.271.4714.27
#FFFFFF14.271.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F82
Deuteranopia (green-blind)
#00267D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #1f157f;
/* rgb */ color: rgb(31, 21, 127);
/* oklch */ color: oklch(30.4% 0.165 274.6);
Tailwind
colors: {
  custom: {
    50: '#6c56a5',
    500: '#1f157f',
    950: '#000000',
  },
}
SCSS
$custom: #1f157f;
$custom-light: #6c56a5;
$custom-dark: #000000;
JSON
{
  "hex": "#1f157f",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 245.66,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.30435,
    "c": 0.16496,
    "h": 274.6
  },
  "luminance": 0.0236
}

Semantic roles & 50–950 ramp

primary
#1F157F
secondary
#A9B43C
accent
#EE39DD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #1F157F

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

Preview Lab → · Contrast checker → · Palette generator →

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