#1F2A8A#1F2A8A

#1F2A8A is a dark, vivid blue. Relative luminance 0.038; OKLCH L 34.8% C 0.158 H 270.3°. Best body text is #FFFFFF at 11.96:1 contrast (WCAG AA passes).

Color values

HEX#1F2A8A
RGBrgb(31, 42, 138)
HSLhsl(234, 63%, 33%)
HSVhsv(234, 78%, 54%)
CMYKcmyk(77.5%, 69.6%, 0%, 45.9%)
CIE-LABlab(22.94, 31.03, -54.44)
CIE-LCHlch(22.94, 62.66, 299.68°)
OKLaboklab(34.82% 0.0009 -0.1575)
OKLCHoklch(34.82% 0.158 270.3)
XYZxyz(5.9789, 3.7816, 24.4546)
Luminance0.0378 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F2A8A #8A7F1F
analogous
#1F5F8A #1F2A8A #491F8A
triadic
#1F2A8A #8A1F2A #2A8A1F
tetradic
#1F2A8A #8A1F5F #8A7F1F #1F8A49
square
#1F2A8A #8A1F5F #8A7F1F #1F8A49
split-complementary
#1F2A8A #8A491F #5F8A1F
monochromatic
#090C26 #141B58 #1F2A8A #2A39BC #4C5BD7

Accessibility & contrast

On white

11.96
#1F2A8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#1F2A8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F2A8A
11.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F2A8A#FFFFFF#000000##FFFFFF
##1F2A8A1.0011.961.7611.96
#FFFFFF11.961.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8D
Deuteranopia (green-blind)
#003288
Tritanopia (blue-blind)
#004456
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #1f2a8a;
/* rgb */ color: rgb(31, 42, 138);
/* oklch */ color: oklch(34.8% 0.158 270.3);
Tailwind
colors: {
  custom: {
    50: '#6d64ad',
    500: '#1f2a8a',
    950: '#000000',
  },
}
SCSS
$custom: #1f2a8a;
$custom-light: #6d64ad;
$custom-dark: #000000;
JSON
{
  "hex": "#1f2a8a",
  "rgb": {
    "r": 31,
    "g": 42,
    "b": 138
  },
  "hsl": {
    "h": 233.832,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34824,
    "c": 0.15754,
    "h": 270.3
  },
  "luminance": 0.03782
}

Semantic roles & 50–950 ramp

primary
#1F2A8A
secondary
#BAAE4B
accent
#D541E6
background
#F7F5FA
surface
#EDEAF4
border
#C8C6CE
text
#080510
muted
#7B797F

Preview Lab

Preview with #1F2A8A

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

Preview Lab → · Contrast checker → · Palette generator →

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