#2D40AB#2D40AB

#2D40AB is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.7% C 0.172 H 269.7°. Best body text is #FFFFFF at 8.63:1 contrast (WCAG AA passes).

Color values

HEX#2D40AB
RGBrgb(45, 64, 171)
HSLhsl(231, 58%, 42%)
HSVhsv(231, 74%, 67%)
CMYKcmyk(73.7%, 62.6%, 0%, 32.9%)
CIE-LABlab(32.18, 30.44, -59.41)
CIE-LCHlch(32.18, 66.75, 297.13°)
OKLaboklab(42.73% -0.0008 -0.1716)
OKLCHoklch(42.73% 0.172 269.7)
XYZxyz(10.2637, 7.1639, 39.3620)
Luminance0.0717 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2D40AB #AB982D
analogous
#2D7FAB #2D40AB #592DAB
triadic
#2D40AB #AB2D40 #40AB2D
tetradic
#2D40AB #AB2D7F #AB982D #2DAB59
square
#2D40AB #AB2D7F #AB982D #2DAB59
split-complementary
#2D40AB #AB592D #7FAB2D
monochromatic
#141C4A #202E7B #2D40AB #475BCE #7786DB

Accessibility & contrast

On white

8.63
#2D40AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.43
#2D40AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2D40AB
8.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2D40AB#FFFFFF#000000##FFFFFF
##2D40AB1.008.632.438.63
#FFFFFF8.631.0021.001.00
#0000002.4321.001.0021.00
##FFFFFF8.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052AE
Deuteranopia (green-blind)
#0046A9
Tritanopia (blue-blind)
#005B6F
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2d40ab;
/* rgb */ color: rgb(45, 64, 171);
/* oklch */ color: oklch(42.7% 0.172 269.7);
Tailwind
colors: {
  custom: {
    50: '#7874c5',
    500: '#2d40ab',
    950: '#000000',
  },
}
SCSS
$custom: #2d40ab;
$custom-light: #7874c5;
$custom-dark: #000000;
JSON
{
  "hex": "#2d40ab",
  "rgb": {
    "r": 45,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 230.952,
    "s": 58.333,
    "l": 42.353
  },
  "oklch": {
    "l": 0.42725,
    "c": 0.17162,
    "h": 269.7
  },
  "luminance": 0.07165
}

Semantic roles & 50–950 ramp

primary
#2D40AB
secondary
#C3B771
accent
#CA46E2
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2D40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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