#1F238E#1F238E

#1F238E is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.1% C 0.171 H 271.3°. Best body text is #FFFFFF at 12.43:1 contrast (WCAG AA passes).

Color values

HEX#1F238E
RGBrgb(31, 35, 142)
HSLhsl(238, 64%, 34%)
HSVhsv(238, 78%, 56%)
CMYKcmyk(78.2%, 75.4%, 0%, 44.3%)
CIE-LABlab(21.75, 36.90, -58.89)
CIE-LCHlch(21.75, 69.50, 302.07°)
OKLaboklab(34.09% 0.004 -0.1705)
OKLCHoklch(34.09% 0.171 271.3)
XYZxyz(6.0469, 3.4457, 25.9323)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F238E #8E8A1F
analogous
#1F5B8E #1F238E #531F8E
triadic
#1F238E #8E1F23 #238E1F
tetradic
#1F238E #8E1F5B #8E8A1F #1F8E53
square
#1F238E #8E1F5B #8E8A1F #1F8E53
split-complementary
#1F238E #8E531F #5B8E1F
monochromatic
#090A2A #14175C #1F238E #2A2FC0 #4F54D9

Accessibility & contrast

On white

12.43
#1F238E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#1F238E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F238E
12.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F238E#FFFFFF#000000##FFFFFF
##1F238E1.0012.431.6912.43
#FFFFFF12.431.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A91
Deuteranopia (green-blind)
#002F8C
Tritanopia (blue-blind)
#004256
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #1f238e;
/* rgb */ color: rgb(31, 35, 142);
/* oklch */ color: oklch(34.1% 0.171 271.3);
Tailwind
colors: {
  custom: {
    50: '#6f5fb0',
    500: '#1f238e',
    950: '#000000',
  },
}
SCSS
$custom: #1f238e;
$custom-light: #6f5fb0;
$custom-dark: #000000;
JSON
{
  "hex": "#1f238e",
  "rgb": {
    "r": 31,
    "g": 35,
    "b": 142
  },
  "hsl": {
    "h": 237.838,
    "s": 64.162,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34094,
    "c": 0.17055,
    "h": 271.3
  },
  "luminance": 0.03446
}

Semantic roles & 50–950 ramp

primary
#1F238E
secondary
#BBB74D
accent
#E141E7
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #1F238E

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

Preview Lab → · Contrast checker → · Palette generator →

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