#1F31B4#1F31B4

#1F31B4 is a dark, highly saturated blue. Relative luminance 0.058; OKLCH L 40.4% C 0.204 H 268.1°. Best body text is #FFFFFF at 9.74:1 contrast (WCAG AA passes).

Color values

HEX#1F31B4
RGBrgb(31, 49, 180)
HSLhsl(233, 71%, 41%)
HSVhsv(233, 83%, 71%)
CMYKcmyk(82.8%, 72.8%, 0%, 29.4%)
CIE-LABlab(28.86, 41.90, -70.26)
CIE-LCHlch(28.86, 81.81, 300.81°)
OKLaboklab(40.39% -0.0067 -0.2036)
OKLCHoklch(40.39% 0.204 268.1)
XYZxyz(9.8988, 5.7820, 43.7655)
Luminance0.0578 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F31B4 #B4A21F
analogous
#1F7CB4 #1F31B4 #581FB4
triadic
#1F31B4 #B41F31 #31B41F
tetradic
#1F31B4 #B41F7C #B4A21F #1FB458
square
#1F31B4 #B41F7C #B4A21F #1FB458
split-complementary
#1F31B4 #B4581F #7CB41F
monochromatic
#0D154C #162380 #1F31B4 #3448DC #6877E5

Accessibility & contrast

On white

9.74
#1F31B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#1F31B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F31B4
9.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F31B4#FFFFFF#000000##FFFFFF
##1F31B41.009.742.169.74
#FFFFFF9.741.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BB8
Deuteranopia (green-blind)
#003DB2
Tritanopia (blue-blind)
#00576F
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #1f31b4;
/* rgb */ color: rgb(31, 49, 180);
/* oklch */ color: oklch(40.4% 0.204 268.1);
Tailwind
colors: {
  custom: {
    50: '#786acc',
    500: '#1f31b4',
    950: '#000000',
  },
}
SCSS
$custom: #1f31b4;
$custom-light: #786acc;
$custom-dark: #000000;
JSON
{
  "hex": "#1f31b4",
  "rgb": {
    "r": 31,
    "g": 49,
    "b": 180
  },
  "hsl": {
    "h": 232.752,
    "s": 70.616,
    "l": 41.373
  },
  "oklch": {
    "l": 0.40389,
    "c": 0.20375,
    "h": 268.1
  },
  "luminance": 0.05783
}

Semantic roles & 50–950 ramp

primary
#1F31B4
secondary
#CBBE64
accent
#D83AED
background
#F8F6FC
surface
#EFEBF9
border
#CAC6D2
text
#0B0614
muted
#7C7A82

Preview Lab

Preview with #1F31B4

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

Preview Lab → · Contrast checker → · Palette generator →

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