#2A40A5#2A40A5

#2A40A5 is a dark, vivid blue. Relative luminance 0.069; OKLCH L 42.0% C 0.164 H 268.7°. Best body text is #FFFFFF at 8.84:1 contrast (WCAG AA passes).

Color values

HEX#2A40A5
RGBrgb(42, 64, 165)
HSLhsl(229, 59%, 41%)
HSVhsv(229, 75%, 65%)
CMYKcmyk(74.5%, 61.2%, 0%, 35.3%)
CIE-LABlab(31.52, 27.84, -56.89)
CIE-LCHlch(31.52, 63.34, 296.08°)
OKLaboklab(42.04% -0.0036 -0.1643)
OKLCHoklch(42.04% 0.164 268.7)
XYZxyz(9.5774, 6.8746, 36.4122)
Luminance0.0688 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A40A5 #A58F2A
analogous
#2A7DA5 #2A40A5 #512AA5
triadic
#2A40A5 #A52A40 #40A52A
tetradic
#2A40A5 #A52A7D #A58F2A #2AA551
square
#2A40A5 #A52A7D #A58F2A #2AA551
split-complementary
#2A40A5 #A5512A #7DA52A
monochromatic
#111A43 #1E2D74 #2A40A5 #3E58CE #6F82DA

Accessibility & contrast

On white

8.84
#2A40A5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#2A40A5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A40A5
8.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A40A5#FFFFFF#000000##FFFFFF
##2A40A51.008.842.388.84
#FFFFFF8.841.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A8
Deuteranopia (green-blind)
#0045A3
Tritanopia (blue-blind)
#005A6C
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2a40a5;
/* rgb */ color: rgb(42, 64, 165);
/* oklch */ color: oklch(42.0% 0.164 268.7);
Tailwind
colors: {
  custom: {
    50: '#7674c1',
    500: '#2a40a5',
    950: '#000000',
  },
}
SCSS
$custom: #2a40a5;
$custom-light: #7674c1;
$custom-dark: #000000;
JSON
{
  "hex": "#2a40a5",
  "rgb": {
    "r": 42,
    "g": 64,
    "b": 165
  },
  "hsl": {
    "h": 229.268,
    "s": 59.42,
    "l": 40.588
  },
  "oklch": {
    "l": 0.4204,
    "c": 0.16434,
    "h": 268.7
  },
  "luminance": 0.06876
}

Semantic roles & 50–950 ramp

primary
#2A40A5
secondary
#C1B269
accent
#C645E3
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2A40A5

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

Preview Lab → · Contrast checker → · Palette generator →

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