#2A40AB#2A40AB

#2A40AB is a dark, vivid blue. Relative luminance 0.071; OKLCH L 42.6% C 0.172 H 268.8°. Best body text is #FFFFFF at 8.68:1 contrast (WCAG AA passes).

Color values

HEX#2A40AB
RGBrgb(42, 64, 171)
HSLhsl(230, 61%, 42%)
HSVhsv(230, 75%, 67%)
CMYKcmyk(75.4%, 62.6%, 0%, 32.9%)
CIE-LABlab(32.03, 30.09, -59.66)
CIE-LCHlch(32.03, 66.82, 296.76°)
OKLaboklab(42.58% -0.0037 -0.1724)
OKLCHoklch(42.58% 0.172 268.8)
XYZxyz(10.1364, 7.0982, 39.3561)
Luminance0.0710 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A40AB #AB952A
analogous
#2A81AB #2A40AB #542AAB
triadic
#2A40AB #AB2A40 #40AB2A
tetradic
#2A40AB #AB2A81 #AB952A #2AAB54
square
#2A40AB #AB2A81 #AB952A #2AAB54
split-complementary
#2A40AB #AB542A #81AB2A
monochromatic
#121B49 #1E2E7A #2A40AB #425AD1 #7385DD

Accessibility & contrast

On white

8.68
#2A40AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.42
#2A40AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A40AB
8.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A40AB#FFFFFF#000000##FFFFFF
##2A40AB1.008.682.428.68
#FFFFFF8.681.0021.001.00
#0000002.4221.001.0021.00
##FFFFFF8.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052AE
Deuteranopia (green-blind)
#0045A9
Tritanopia (blue-blind)
#005C6F
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #2a40ab;
/* rgb */ color: rgb(42, 64, 171);
/* oklch */ color: oklch(42.6% 0.172 268.8);
Tailwind
colors: {
  custom: {
    50: '#7774c5',
    500: '#2a40ab',
    950: '#000000',
  },
}
SCSS
$custom: #2a40ab;
$custom-light: #7774c5;
$custom-dark: #000000;
JSON
{
  "hex": "#2a40ab",
  "rgb": {
    "r": 42,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 229.767,
    "s": 60.563,
    "l": 41.765
  },
  "oklch": {
    "l": 0.42575,
    "c": 0.17245,
    "h": 268.8
  },
  "luminance": 0.07099
}

Semantic roles & 50–950 ramp

primary
#2A40AB
secondary
#C4B56D
accent
#C844E4
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2A40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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