#2A40B6#2A40B6

#2A40B6 is a dark, vivid blue. Relative luminance 0.075; OKLCH L 43.6% C 0.187 H 268.7°. Best body text is #FFFFFF at 8.38:1 contrast (WCAG AA passes).

Color values

HEX#2A40B6
RGBrgb(42, 64, 182)
HSLhsl(231, 63%, 44%)
HSVhsv(231, 77%, 71%)
CMYKcmyk(76.9%, 64.8%, 0%, 28.6%)
CIE-LABlab(33.00, 34.15, -64.62)
CIE-LCHlch(33.00, 73.09, 297.86°)
OKLaboklab(43.58% -0.0041 -0.1869)
OKLCHoklch(43.58% 0.187 268.7)
XYZxyz(11.2288, 7.5352, 45.1095)
Luminance0.0754 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A40B6 #B6A02A
analogous
#2A86B6 #2A40B6 #5A2AB6
triadic
#2A40B6 #B62A40 #40B62A
tetradic
#2A40B6 #B62A86 #B6A02A #2AB65A
square
#2A40B6 #B62A86 #B6A02A #2AB65A
split-complementary
#2A40B6 #B65A2A #86B62A
monochromatic
#131D53 #1F2F84 #2A40B6 #485ED5 #7A8AE0

Accessibility & contrast

On white

8.38
#2A40B6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.51
#2A40B6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A40B6
8.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A40B6#FFFFFF#000000##FFFFFF
##2A40B61.008.382.518.38
#FFFFFF8.381.0021.001.00
#0000002.5121.001.0021.00
##FFFFFF8.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054BA
Deuteranopia (green-blind)
#0047B4
Tritanopia (blue-blind)
#005F75
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #2a40b6;
/* rgb */ color: rgb(42, 64, 182);
/* oklch */ color: oklch(43.6% 0.187 268.7);
Tailwind
colors: {
  custom: {
    50: '#7a74cd',
    500: '#2a40b6',
    950: '#000000',
  },
}
SCSS
$custom: #2a40b6;
$custom-light: #7a74cd;
$custom-dark: #000000;
JSON
{
  "hex": "#2a40b6",
  "rgb": {
    "r": 42,
    "g": 64,
    "b": 182
  },
  "hsl": {
    "h": 230.571,
    "s": 62.5,
    "l": 43.922
  },
  "oklch": {
    "l": 0.43584,
    "c": 0.18699,
    "h": 268.7
  },
  "luminance": 0.07536
}

Semantic roles & 50–950 ramp

primary
#2A40B6
secondary
#C8BB73
accent
#CC42E6
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0B0814
muted
#7C7B82

Preview Lab

Preview with #2A40B6

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

Preview Lab → · Contrast checker → · Palette generator →

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