#1F42B2#1F42B2

#1F42B2 is a dark, vivid blue. Relative luminance 0.074; OKLCH L 43.1% C 0.182 H 265.6°. Best body text is #FFFFFF at 8.47:1 contrast (WCAG AA passes).

Color values

HEX#1F42B2
RGBrgb(31, 66, 178)
HSLhsl(226, 70%, 41%)
HSVhsv(226, 83%, 70%)
CMYKcmyk(82.6%, 62.9%, 0%, 30.2%)
CIE-LABlab(32.70, 30.34, -62.75)
CIE-LCHlch(32.70, 69.70, 295.81°)
OKLaboklab(43.14% -0.0141 -0.1816)
OKLCHoklch(43.14% 0.182 265.6)
XYZxyz(10.5463, 7.4008, 42.9835)
Luminance0.0740 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F42B2 #B28F1F
analogous
#1F8BB2 #1F42B2 #451FB2
triadic
#1F42B2 #B21F42 #42B21F
tetradic
#1F42B2 #B21F8B #B28F1F #1FB245
square
#1F42B2 #B21F8B #B28F1F #1FB245
split-complementary
#1F42B2 #B2451F #8BB21F
monochromatic
#0D1B4A #162F7E #1F42B2 #335BDB #6785E5

Accessibility & contrast

On white

8.47
#1F42B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.48
#1F42B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F42B2
8.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F42B2#FFFFFF#000000##FFFFFF
##1F42B21.008.472.488.47
#FFFFFF8.471.0021.001.00
#0000002.4821.001.0021.00
##FFFFFF8.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B6
Deuteranopia (green-blind)
#0046B0
Tritanopia (blue-blind)
#005F73
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #1f42b2;
/* rgb */ color: rgb(31, 66, 178);
/* oklch */ color: oklch(43.1% 0.182 265.6);
Tailwind
colors: {
  custom: {
    50: '#7576ca',
    500: '#1f42b2',
    950: '#000000',
  },
}
SCSS
$custom: #1f42b2;
$custom-light: #7576ca;
$custom-dark: #000000;
JSON
{
  "hex": "#1f42b2",
  "rgb": {
    "r": 31,
    "g": 66,
    "b": 178
  },
  "hsl": {
    "h": 225.714,
    "s": 70.335,
    "l": 40.98
  },
  "oklch": {
    "l": 0.43137,
    "c": 0.18218,
    "h": 265.6
  },
  "luminance": 0.07402
}

Semantic roles & 50–950 ramp

primary
#1F42B2
secondary
#CAB163
accent
#C33BED
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #1F42B2

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

Preview Lab → · Contrast checker → · Palette generator →

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