#1F217F#1F217F

#1F217F is a dark, vivid blue. Relative luminance 0.029; OKLCH L 32.1% C 0.153 H 272.8°. Best body text is #FFFFFF at 13.27:1 contrast (WCAG AA passes).

Color values

HEX#1F217F
RGBrgb(31, 33, 127)
HSLhsl(239, 61%, 31%)
HSVhsv(239, 76%, 50%)
CMYKcmyk(75.6%, 74%, 0%, 50.2%)
CIE-LABlab(19.68, 32.77, -52.88)
CIE-LCHlch(19.68, 62.21, 301.79°)
OKLaboklab(32.14% 0.0075 -0.153)
OKLCHoklch(32.14% 0.153 272.8)
XYZxyz(4.9384, 2.9108, 20.3761)
Luminance0.0291 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F217F #7F7D1F
analogous
#1F517F #1F217F #4D1F7F
triadic
#1F217F #7F1F21 #217F1F
tetradic
#1F217F #7F1F51 #7F7D1F #1F7F4D
square
#1F217F #7F1F51 #7F7D1F #1F7F4D
split-complementary
#1F217F #7F4D1F #517F1F
monochromatic
#07071D #13144E #1F217F #2B2EB0 #4649D2

Accessibility & contrast

On white

13.27
#1F217F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#1F217F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F217F
13.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F217F#FFFFFF#000000##FFFFFF
##1F217F1.0013.271.5813.27
#FFFFFF13.271.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003482
Deuteranopia (green-blind)
#002B7D
Tritanopia (blue-blind)
#003B4D
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #1f217f;
/* rgb */ color: rgb(31, 33, 127);
/* oklch */ color: oklch(32.1% 0.153 272.8);
Tailwind
colors: {
  custom: {
    50: '#6b5da5',
    500: '#1f217f',
    950: '#000000',
  },
}
SCSS
$custom: #1f217f;
$custom-light: #6b5da5;
$custom-dark: #000000;
JSON
{
  "hex": "#1f217f",
  "rgb": {
    "r": 31,
    "g": 33,
    "b": 127
  },
  "hsl": {
    "h": 238.75,
    "s": 60.759,
    "l": 30.98
  },
  "oklch": {
    "l": 0.32136,
    "c": 0.15315,
    "h": 272.8
  },
  "luminance": 0.02911
}

Semantic roles & 50–950 ramp

primary
#1F217F
secondary
#B2B048
accent
#E144E4
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#08040F
muted
#7A797F

Preview Lab

Preview with #1F217F

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

Preview Lab → · Contrast checker → · Palette generator →

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