#1F158A#1F158A

#1F158A is a dark, vivid blue. Relative luminance 0.027; OKLCH L 31.8% C 0.178 H 273.2°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#1F158A
RGBrgb(31, 21, 138)
HSLhsl(245, 74%, 31%)
HSVhsv(245, 85%, 54%)
CMYKcmyk(77.5%, 84.8%, 0%, 45.9%)
CIE-LABlab(18.64, 43.15, -61.54)
CIE-LCHlch(18.64, 75.16, 305.04°)
OKLaboklab(31.78% 0.0101 -0.178)
OKLCHoklch(31.78% 0.178 273.2)
XYZxyz(5.4192, 2.6620, 24.2681)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#1F158A #808A15
analogous
#15458A #1F158A #59158A
triadic
#1F158A #8A1F15 #158A1F
tetradic
#1F158A #8A1545 #808A15 #158A59
square
#1F158A #8A1545 #808A15 #158A59
split-complementary
#1F158A #8A5915 #458A15
monochromatic
#070520 #130D55 #1F158A #2B1DBF #4739E1

Accessibility & contrast

On white

13.70
#1F158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#1F158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #1F158A
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##1F158A#FFFFFF#000000##FFFFFF
##1F158A1.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00338D
Deuteranopia (green-blind)
#002888
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #1f158a;
/* rgb */ color: rgb(31, 21, 138);
/* oklch */ color: oklch(31.8% 0.178 273.2);
Tailwind
colors: {
  custom: {
    50: '#6f57ad',
    500: '#1f158a',
    950: '#000000',
  },
}
SCSS
$custom: #1f158a;
$custom-light: #6f57ad;
$custom-dark: #000000;
JSON
{
  "hex": "#1f158a",
  "rgb": {
    "r": 31,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 245.128,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.31775,
    "c": 0.1783,
    "h": 273.2
  },
  "luminance": 0.02663
}

Semantic roles & 50–950 ramp

primary
#1F158A
secondary
#B3BE3D
accent
#F038E0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #1F158A

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

Preview Lab → · Contrast checker → · Palette generator →

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