#1F3A8A#1F3A8A

#1F3A8A is a dark, vivid blue. Relative luminance 0.052; OKLCH L 38.0% C 0.137 H 265.9°. Best body text is #FFFFFF at 10.34:1 contrast (WCAG AA passes).

Color values

HEX#1F3A8A
RGBrgb(31, 58, 138)
HSLhsl(225, 63%, 33%)
HSVhsv(225, 78%, 54%)
CMYKcmyk(77.5%, 58%, 0%, 45.9%)
CIE-LABlab(27.16, 20.13, -47.53)
CIE-LCHlch(27.16, 51.62, 292.95°)
OKLaboklab(37.95% -0.0099 -0.1371)
OKLCHoklch(37.95% 0.137 265.9)
XYZxyz(6.6640, 5.1517, 24.6830)
Luminance0.0515 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F3A8A #8A6F1F
analogous
#1F6F8A #1F3A8A #391F8A
triadic
#1F3A8A #8A1F3A #3A8A1F
tetradic
#1F3A8A #8A1F6F #8A6F1F #1F8A39
square
#1F3A8A #8A1F6F #8A6F1F #1F8A39
split-complementary
#1F3A8A #8A391F #6F8A1F
monochromatic
#091026 #142558 #1F3A8A #2A4FBC #4C6FD7

Accessibility & contrast

On white

10.34
#1F3A8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#1F3A8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F3A8A
10.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F3A8A#FFFFFF#000000##FFFFFF
##1F3A8A1.0010.342.0310.34
#FFFFFF10.341.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00458D
Deuteranopia (green-blind)
#003B88
Tritanopia (blue-blind)
#004E5C
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #1f3a8a;
/* rgb */ color: rgb(31, 58, 138);
/* oklch */ color: oklch(38.0% 0.137 265.9);
Tailwind
colors: {
  custom: {
    50: '#6c6fad',
    500: '#1f3a8a',
    950: '#000000',
  },
}
SCSS
$custom: #1f3a8a;
$custom-light: #6c6fad;
$custom-dark: #000000;
JSON
{
  "hex": "#1f3a8a",
  "rgb": {
    "r": 31,
    "g": 58,
    "b": 138
  },
  "hsl": {
    "h": 224.86,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.3795,
    "c": 0.13747,
    "h": 265.9
  },
  "luminance": 0.05152
}

Semantic roles & 50–950 ramp

primary
#1F3A8A
secondary
#BA9E4B
accent
#BD41E6
background
#F6F6FA
surface
#ECECF4
border
#C7C7CE
text
#080710
muted
#7A7A7F

Preview Lab

Preview with #1F3A8A

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

Preview Lab → · Contrast checker → · Palette generator →

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