#1F127E#1F127E

#1F127E is a dark, vivid blue. Relative luminance 0.022; OKLCH L 30.0% C 0.166 H 275.0°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#1F127E
RGBrgb(31, 18, 126)
HSLhsl(247, 75%, 28%)
HSVhsv(247, 86%, 49%)
CMYKcmyk(75.4%, 85.7%, 0%, 50.6%)
CIE-LABlab(16.65, 40.76, -57.26)
CIE-LCHlch(16.65, 70.28, 305.45°)
OKLaboklab(29.97% 0.0145 -0.1655)
OKLCHoklch(29.97% 0.166 275)
XYZxyz(4.5460, 2.2298, 19.9254)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F127E #717E12
analogous
#123B7E #1F127E #55127E
triadic
#1F127E #7E1F12 #127E1F
tetradic
#1F127E #7E123B #717E12 #127E55
square
#1F127E #7E123B #717E12 #127E55
split-complementary
#1F127E #7E5512 #3B7E12
monochromatic
#07041B #120A48 #1F127E #2C1AB4 #402AE1

Accessibility & contrast

On white

14.52
#1F127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#1F127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F127E
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F127E#FFFFFF#000000##FFFFFF
##1F127E1.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E81
Deuteranopia (green-blind)
#00247C
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #1f127e;
/* rgb */ color: rgb(31, 18, 126);
/* oklch */ color: oklch(30.0% 0.166 275.0);
Tailwind
colors: {
  custom: {
    50: '#6c54a5',
    500: '#1f127e',
    950: '#000000',
  },
}
SCSS
$custom: #1f127e;
$custom-light: #6c54a5;
$custom-dark: #000000;
JSON
{
  "hex": "#1f127e",
  "rgb": {
    "r": 31,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 247.222,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.2997,
    "c": 0.16616,
    "h": 275
  },
  "luminance": 0.0223
}

Semantic roles & 50–950 ramp

primary
#1F127E
secondary
#A5B438
accent
#F236DB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #1F127E

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

Preview Lab → · Contrast checker → · Palette generator →

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