#18157E#18157E

#18157E is a dark, vivid blue. Relative luminance 0.022; OKLCH L 29.9% C 0.166 H 271.4°. Best body text is #FFFFFF at 14.51:1 contrast (WCAG AA passes).

Color values

HEX#18157E
RGBrgb(24, 21, 126)
HSLhsl(242, 71%, 29%)
HSVhsv(242, 83%, 49%)
CMYKcmyk(81%, 83.3%, 0%, 50.6%)
CIE-LABlab(16.68, 38.79, -57.22)
CIE-LCHlch(16.68, 69.13, 304.14°)
OKLaboklab(29.87% 0.0042 -0.1656)
OKLCHoklch(29.87% 0.166 271.4)
XYZxyz(4.4095, 2.2364, 19.9339)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#18157E #7B7E15
analogous
#15477E #18157E #4D157E
triadic
#18157E #7E1815 #157E18
tetradic
#18157E #7E1547 #7B7E15 #157E4D
square
#18157E #7E1547 #7B7E15 #157E4D
split-complementary
#18157E #7E4D15 #477E15
monochromatic
#05041A #0E0C4A #18157E #221EB2 #3631DD

Accessibility & contrast

On white

14.51
#18157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#18157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #18157E
14.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##18157E#FFFFFF#000000##FFFFFF
##18157E1.0014.511.4514.51
#FFFFFF14.511.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.511.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #18157e;
/* rgb */ color: rgb(24, 21, 126);
/* oklch */ color: oklch(29.9% 0.166 271.4);
Tailwind
colors: {
  custom: {
    50: '#6a55a5',
    500: '#18157e',
    950: '#000000',
  },
}
SCSS
$custom: #18157e;
$custom-light: #6a55a5;
$custom-dark: #000000;
JSON
{
  "hex": "#18157e",
  "rgb": {
    "r": 24,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 241.714,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.29867,
    "c": 0.16566,
    "h": 271.4
  },
  "luminance": 0.02237
}

Semantic roles & 50–950 ramp

primary
#18157E
secondary
#B0B33C
accent
#EE3AE9
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#08030F
muted
#7A787F

Preview Lab

Preview with #18157E

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

Preview Lab → · Contrast checker → · Palette generator →

#18157E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva