#1F42A8#1F42A8

#1F42A8 is a dark, vivid blue. Relative luminance 0.070; OKLCH L 42.2% C 0.169 H 265.2°. Best body text is #FFFFFF at 8.74:1 contrast (WCAG AA passes).

Color values

HEX#1F42A8
RGBrgb(31, 66, 168)
HSLhsl(225, 69%, 39%)
HSVhsv(225, 82%, 66%)
CMYKcmyk(81.5%, 60.7%, 0%, 34.1%)
CIE-LABlab(31.84, 26.48, -58.19)
CIE-LCHlch(31.84, 63.93, 294.47°)
OKLaboklab(42.23% -0.0142 -0.1683)
OKLCHoklch(42.23% 0.169 265.2)
XYZxyz(9.5787, 7.0137, 37.8871)
Luminance0.0702 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F42A8 #A8851F
analogous
#1F87A8 #1F42A8 #411FA8
triadic
#1F42A8 #A81F42 #42A81F
tetradic
#1F42A8 #A81F87 #A8851F #1FA841
square
#1F42A8 #A81F87 #A8851F #1FA841
split-complementary
#1F42A8 #A8411F #87A81F
monochromatic
#0C1941 #152E74 #1F42A8 #2C58D8 #6081E2

Accessibility & contrast

On white

8.74
#1F42A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.40
#1F42A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F42A8
8.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F42A8#FFFFFF#000000##FFFFFF
##1F42A81.008.742.408.74
#FFFFFF8.741.0021.001.00
#0000002.4021.001.0021.00
##FFFFFF8.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051AB
Deuteranopia (green-blind)
#0045A6
Tritanopia (blue-blind)
#005C6E
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #1f42a8;
/* rgb */ color: rgb(31, 66, 168);
/* oklch */ color: oklch(42.2% 0.169 265.2);
Tailwind
colors: {
  custom: {
    50: '#7375c3',
    500: '#1f42a8',
    950: '#000000',
  },
}
SCSS
$custom: #1f42a8;
$custom-light: #7375c3;
$custom-dark: #000000;
JSON
{
  "hex": "#1f42a8",
  "rgb": {
    "r": 31,
    "g": 66,
    "b": 168
  },
  "hsl": {
    "h": 224.672,
    "s": 68.844,
    "l": 39.02
  },
  "oklch": {
    "l": 0.42228,
    "c": 0.16889,
    "h": 265.2
  },
  "luminance": 0.07015
}

Semantic roles & 50–950 ramp

primary
#1F42A8
secondary
#C6AB5D
accent
#BF3CEC
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#090813
muted
#7B7B82

Preview Lab

Preview with #1F42A8

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

Preview Lab → · Contrast checker → · Palette generator →

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