#2E40A6#2E40A6

#2E40A6 is a dark, vivid blue. Relative luminance 0.070; OKLCH L 42.3% C 0.165 H 270.1°. Best body text is #FFFFFF at 8.75:1 contrast (WCAG AA passes).

Color values

HEX#2E40A6
RGBrgb(46, 64, 166)
HSLhsl(231, 57%, 42%)
HSVhsv(231, 72%, 65%)
CMYKcmyk(72.3%, 61.4%, 0%, 34.9%)
CIE-LABlab(31.81, 28.72, -57.02)
CIE-LCHlch(31.81, 63.84, 296.74°)
OKLaboklab(42.33% 0.0003 -0.1646)
OKLCHoklch(42.33% 0.165 270.1)
XYZxyz(9.8407, 6.9998, 36.9015)
Luminance0.0700 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2E40A6 #A6942E
analogous
#2E7CA6 #2E40A6 #582EA6
triadic
#2E40A6 #A62E40 #40A62E
tetradic
#2E40A6 #A62E7C #A6942E #2EA658
square
#2E40A6 #A62E7C #A6942E #2EA658
split-complementary
#2E40A6 #A6582E #7CA62E
monochromatic
#131B46 #212E76 #2E40A6 #465ACC #7684D9

Accessibility & contrast

On white

8.75
#2E40A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.40
#2E40A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2E40A6
8.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2E40A6#FFFFFF#000000##FFFFFF
##2E40A61.008.752.408.75
#FFFFFF8.751.0021.001.00
#0000002.4021.001.0021.00
##FFFFFF8.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051A9
Deuteranopia (green-blind)
#0045A4
Tritanopia (blue-blind)
#005A6D
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #2e40a6;
/* rgb */ color: rgb(46, 64, 166);
/* oklch */ color: oklch(42.3% 0.165 270.1);
Tailwind
colors: {
  custom: {
    50: '#7874c1',
    500: '#2e40a6',
    950: '#000000',
  },
}
SCSS
$custom: #2e40a6;
$custom-light: #7874c1;
$custom-dark: #000000;
JSON
{
  "hex": "#2e40a6",
  "rgb": {
    "r": 46,
    "g": 64,
    "b": 166
  },
  "hsl": {
    "h": 231,
    "s": 56.604,
    "l": 41.569
  },
  "oklch": {
    "l": 0.42333,
    "c": 0.16457,
    "h": 270.1
  },
  "luminance": 0.07001
}

Semantic roles & 50–950 ramp

primary
#2E40A6
secondary
#C1B46F
accent
#C948E0
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2E40A6

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

Preview Lab → · Contrast checker → · Palette generator →

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