#1F238B#1F238B

#1F238B is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.8% C 0.167 H 271.5°. Best body text is #FFFFFF at 12.56:1 contrast (WCAG AA passes).

Color values

HEX#1F238B
RGBrgb(31, 35, 139)
HSLhsl(238, 64%, 33%)
HSVhsv(238, 78%, 55%)
CMYKcmyk(77.7%, 74.8%, 0%, 45.5%)
CIE-LABlab(21.42, 35.84, -57.56)
CIE-LCHlch(21.42, 67.81, 301.91°)
OKLaboklab(33.76% 0.0045 -0.1666)
OKLCHoklch(33.76% 0.167 271.5)
XYZxyz(5.8247, 3.3568, 24.7620)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F238B #8B871F
analogous
#1F598B #1F238B #511F8B
triadic
#1F238B #8B1F23 #238B1F
tetradic
#1F238B #8B1F59 #8B871F #1F8B51
square
#1F238B #8B1F59 #8B871F #1F8B51
split-complementary
#1F238B #8B511F #598B1F
monochromatic
#090A27 #141659 #1F238B #2A30BD #4D52D7

Accessibility & contrast

On white

12.56
#1F238B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#1F238B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F238B
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F238B#FFFFFF#000000##FFFFFF
##1F238B1.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00398E
Deuteranopia (green-blind)
#002E89
Tritanopia (blue-blind)
#004155
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #1f238b;
/* rgb */ color: rgb(31, 35, 139);
/* oklch */ color: oklch(33.8% 0.167 271.5);
Tailwind
colors: {
  custom: {
    50: '#6e5fae',
    500: '#1f238b',
    950: '#000000',
  },
}
SCSS
$custom: #1f238b;
$custom-light: #6e5fae;
$custom-dark: #000000;
JSON
{
  "hex": "#1f238b",
  "rgb": {
    "r": 31,
    "g": 35,
    "b": 139
  },
  "hsl": {
    "h": 237.778,
    "s": 63.529,
    "l": 33.333
  },
  "oklch": {
    "l": 0.33764,
    "c": 0.16669,
    "h": 271.5
  },
  "luminance": 0.03357
}

Semantic roles & 50–950 ramp

primary
#1F238B
secondary
#BAB64C
accent
#E041E7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#080410
muted
#7B797F

Preview Lab

Preview with #1F238B

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

Preview Lab → · Contrast checker → · Palette generator →

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