#2040A8#2040A8

#2040A8 is a dark, vivid blue. Relative luminance 0.068; OKLCH L 41.9% C 0.171 H 265.9°. Best body text is #FFFFFF at 8.90:1 contrast (WCAG AA passes).

Color values

HEX#2040A8
RGBrgb(32, 64, 168)
HSLhsl(226, 68%, 39%)
HSVhsv(226, 81%, 66%)
CMYKcmyk(81%, 61.9%, 0%, 34.1%)
CIE-LABlab(31.35, 27.91, -58.99)
CIE-LCHlch(31.35, 65.26, 295.32°)
OKLaboklab(41.87% -0.0123 -0.1706)
OKLCHoklch(41.87% 0.171 265.9)
XYZxyz(9.4945, 6.7999, 37.8503)
Luminance0.0680 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2040A8 #A88820
analogous
#2084A8 #2040A8 #4420A8
triadic
#2040A8 #A82040 #40A820
tetradic
#2040A8 #A82084 #A88820 #20A844
square
#2040A8 #A82084 #A88820 #20A844
split-complementary
#2040A8 #A84420 #84A820
monochromatic
#0C1941 #162C75 #2040A8 #2E56D7 #617FE1

Accessibility & contrast

On white

8.90
#2040A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#2040A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2040A8
8.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2040A8#FFFFFF#000000##FFFFFF
##2040A81.008.902.368.90
#FFFFFF8.901.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050AB
Deuteranopia (green-blind)
#0044A6
Tritanopia (blue-blind)
#005B6E
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2040a8;
/* rgb */ color: rgb(32, 64, 168);
/* oklch */ color: oklch(41.9% 0.171 265.9);
Tailwind
colors: {
  custom: {
    50: '#7374c3',
    500: '#2040a8',
    950: '#000000',
  },
}
SCSS
$custom: #2040a8;
$custom-light: #7374c3;
$custom-dark: #000000;
JSON
{
  "hex": "#2040a8",
  "rgb": {
    "r": 32,
    "g": 64,
    "b": 168
  },
  "hsl": {
    "h": 225.882,
    "s": 68,
    "l": 39.216
  },
  "oklch": {
    "l": 0.41872,
    "c": 0.17109,
    "h": 265.9
  },
  "luminance": 0.06801
}

Semantic roles & 50–950 ramp

primary
#2040A8
secondary
#C6AD5E
accent
#C23DEB
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2040A8

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

Preview Lab → · Contrast checker → · Palette generator →

#2040A8 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva