#2240A8#2240A8

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

Color values

HEX#2240A8
RGBrgb(34, 64, 168)
HSLhsl(227, 66%, 40%)
HSVhsv(227, 80%, 66%)
CMYKcmyk(79.8%, 61.9%, 0%, 34.1%)
CIE-LABlab(31.42, 28.11, -58.87)
CIE-LCHlch(31.42, 65.23, 295.52°)
OKLaboklab(41.95% -0.0107 -0.1702)
OKLCHoklch(41.95% 0.171 266.4)
XYZxyz(9.5585, 6.8329, 37.8533)
Luminance0.0683 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2240A8 #A88A22
analogous
#2283A8 #2240A8 #4722A8
triadic
#2240A8 #A82240 #40A822
tetradic
#2240A8 #A82283 #A88A22 #22A847
square
#2240A8 #A82283 #A88A22 #22A847
split-complementary
#2240A8 #A84722 #83A822
monochromatic
#0D1942 #182D75 #2240A8 #3256D5 #6580E0

Accessibility & contrast

On white

8.87
#2240A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#2240A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2240A8
8.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2240A8#FFFFFF#000000##FFFFFF
##2240A81.008.872.378.87
#FFFFFF8.871.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.871.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: #2240a8;
/* rgb */ color: rgb(34, 64, 168);
/* oklch */ color: oklch(41.9% 0.171 266.4);
Tailwind
colors: {
  custom: {
    50: '#7474c3',
    500: '#2240a8',
    950: '#000000',
  },
}
SCSS
$custom: #2240a8;
$custom-light: #7474c3;
$custom-dark: #000000;
JSON
{
  "hex": "#2240a8",
  "rgb": {
    "r": 34,
    "g": 64,
    "b": 168
  },
  "hsl": {
    "h": 226.567,
    "s": 66.337,
    "l": 39.608
  },
  "oklch": {
    "l": 0.4195,
    "c": 0.17058,
    "h": 266.4
  },
  "luminance": 0.06834
}

Semantic roles & 50–950 ramp

primary
#2240A8
secondary
#C5AF61
accent
#C33FE9
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2240A8

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

Preview Lab → · Contrast checker → · Palette generator →

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