#12157E#12157E

#12157E is a dark, vivid blue. Relative luminance 0.022; OKLCH L 29.6% C 0.167 H 269.1°. Best body text is #FFFFFF at 14.64:1 contrast (WCAG AA passes).

Color values

HEX#12157E
RGBrgb(18, 21, 126)
HSLhsl(238, 75%, 28%)
HSVhsv(238, 86%, 49%)
CMYKcmyk(85.7%, 83.3%, 0%, 50.6%)
CIE-LABlab(16.36, 38.44, -57.76)
CIE-LCHlch(16.36, 69.38, 303.64°)
OKLaboklab(29.55% -0.0027 -0.1673)
OKLCHoklch(29.55% 0.167 269.1)
XYZxyz(4.2822, 2.1708, 19.9279)
Luminance0.0217 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#12157E #7E7B12
analogous
#124B7E #12157E #45127E
triadic
#12157E #7E1215 #157E12
tetradic
#12157E #7E124B #7E7B12 #127E45
square
#12157E #7E124B #7E7B12 #127E45
split-complementary
#12157E #7E4512 #4B7E12
monochromatic
#04041B #0A0C48 #12157E #1A1EB4 #2A2FE1

Accessibility & contrast

On white

14.64
#12157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#12157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #12157E
14.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##12157E#FFFFFF#000000##FFFFFF
##12157E1.0014.641.4314.64
#FFFFFF14.641.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.641.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #12157e;
/* rgb */ color: rgb(18, 21, 126);
/* oklch */ color: oklch(29.6% 0.167 269.1);
Tailwind
colors: {
  custom: {
    50: '#6855a5',
    500: '#12157e',
    950: '#000000',
  },
}
SCSS
$custom: #12157e;
$custom-light: #6855a5;
$custom-dark: #000000;
JSON
{
  "hex": "#12157e",
  "rgb": {
    "r": 18,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 238.333,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.29554,
    "c": 0.16731,
    "h": 269.1
  },
  "luminance": 0.02171
}

Semantic roles & 50–950 ramp

primary
#12157E
secondary
#B4B038
accent
#EC36F2
background
#F6F5FA
surface
#ECE9F4
border
#C7C5CE
text
#07030F
muted
#7A787F

Preview Lab

Preview with #12157E

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

Preview Lab → · Contrast checker → · Palette generator →

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