#2E40A4#2E40A4

#2E40A4 is a dark, vivid blue. Relative luminance 0.069; OKLCH L 42.2% C 0.162 H 270.1°. Best body text is #FFFFFF at 8.80:1 contrast (WCAG AA passes).

Color values

HEX#2E40A4
RGBrgb(46, 64, 164)
HSLhsl(231, 56%, 41%)
HSVhsv(231, 72%, 64%)
CMYKcmyk(72%, 61%, 0%, 35.7%)
CIE-LABlab(31.64, 27.98, -56.08)
CIE-LCHlch(31.64, 62.68, 296.51°)
OKLaboklab(42.16% 0.0003 -0.1618)
OKLCHoklch(42.16% 0.162 270.1)
XYZxyz(9.6587, 6.9270, 35.9428)
Luminance0.0693 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E40A4 #A4922E
analogous
#2E7BA4 #2E40A4 #572EA4
triadic
#2E40A4 #A42E40 #40A42E
tetradic
#2E40A4 #A42E7B #A4922E #2EA457
square
#2E40A4 #A42E7B #A4922E #2EA457
split-complementary
#2E40A4 #A4572E #7BA42E
monochromatic
#131B44 #212D74 #2E40A4 #4559CB #7484D8

Accessibility & contrast

On white

8.80
#2E40A4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#2E40A4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E40A4
8.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E40A4#FFFFFF#000000##FFFFFF
##2E40A41.008.802.398.80
#FFFFFF8.801.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A7
Deuteranopia (green-blind)
#0045A2
Tritanopia (blue-blind)
#00596B
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2e40a4;
/* rgb */ color: rgb(46, 64, 164);
/* oklch */ color: oklch(42.2% 0.162 270.1);
Tailwind
colors: {
  custom: {
    50: '#7774c0',
    500: '#2e40a4',
    950: '#000000',
  },
}
SCSS
$custom: #2e40a4;
$custom-light: #7774c0;
$custom-dark: #000000;
JSON
{
  "hex": "#2e40a4",
  "rgb": {
    "r": 46,
    "g": 64,
    "b": 164
  },
  "hsl": {
    "h": 230.847,
    "s": 56.19,
    "l": 41.176
  },
  "oklch": {
    "l": 0.42158,
    "c": 0.16184,
    "h": 270.1
  },
  "luminance": 0.06928
}

Semantic roles & 50–950 ramp

primary
#2E40A4
secondary
#C0B36E
accent
#C848DF
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2E40A4

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

Preview Lab → · Contrast checker → · Palette generator →

#2E40A4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva