#1F2798#1F2798

#1F2798 is a dark, vivid blue. Relative luminance 0.040; OKLCH L 35.8% C 0.179 H 270.2°. Best body text is #FFFFFF at 11.66:1 contrast (WCAG AA passes).

Color values

HEX#1F2798
RGBrgb(31, 39, 152)
HSLhsl(236, 66%, 36%)
HSVhsv(236, 80%, 60%)
CMYKcmyk(79.6%, 74.3%, 0%, 40.4%)
CIE-LABlab(23.70, 38.03, -61.85)
CIE-LCHlch(23.70, 72.60, 301.58°)
OKLaboklab(35.81% 0.0007 -0.1791)
OKLCHoklch(35.81% 0.179 270.2)
XYZxyz(6.9562, 4.0086, 30.1068)
Luminance0.0401 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F2798 #98901F
analogous
#1F6398 #1F2798 #531F98
triadic
#1F2798 #981F27 #27981F
tetradic
#1F2798 #981F63 #98901F #1F9853
square
#1F2798 #981F63 #98901F #1F9853
split-complementary
#1F2798 #98531F #63981F
monochromatic
#0A0D32 #151A65 #1F2798 #2934CB #555EDC

Accessibility & contrast

On white

11.66
#1F2798 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#1F2798 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F2798
11.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F2798#FFFFFF#000000##FFFFFF
##1F27981.0011.661.8011.66
#FFFFFF11.661.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E9B
Deuteranopia (green-blind)
#003296
Tritanopia (blue-blind)
#00485D
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #1f2798;
/* rgb */ color: rgb(31, 39, 152);
/* oklch */ color: oklch(35.8% 0.179 270.2);
Tailwind
colors: {
  custom: {
    50: '#7162b8',
    500: '#1f2798',
    950: '#000000',
  },
}
SCSS
$custom: #1f2798;
$custom-light: #7162b8;
$custom-dark: #000000;
JSON
{
  "hex": "#1f2798",
  "rgb": {
    "r": 31,
    "g": 39,
    "b": 152
  },
  "hsl": {
    "h": 236.033,
    "s": 66.12,
    "l": 35.882
  },
  "oklch": {
    "l": 0.3581,
    "c": 0.17912,
    "h": 270.2
  },
  "luminance": 0.04009
}

Semantic roles & 50–950 ramp

primary
#1F2798
secondary
#C0B953
accent
#DE3FE9
background
#F7F5FB
surface
#EDEAF6
border
#C8C6D0
text
#090511
muted
#7B7980

Preview Lab

Preview with #1F2798

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

Preview Lab → · Contrast checker → · Palette generator →

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