#2A40B8#2A40B8

#2A40B8 is a dark, vivid blue. Relative luminance 0.076; OKLCH L 43.8% C 0.190 H 268.7°. Best body text is #FFFFFF at 8.32:1 contrast (WCAG AA passes).

Color values

HEX#2A40B8
RGBrgb(42, 64, 184)
HSLhsl(231, 63%, 44%)
HSVhsv(231, 77%, 72%)
CMYKcmyk(77.2%, 65.2%, 0%, 27.8%)
CIE-LABlab(33.18, 34.89, -65.51)
CIE-LCHlch(33.18, 74.22, 298.04°)
OKLaboklab(43.77% -0.0042 -0.1895)
OKLCHoklch(43.77% 0.19 268.7)
XYZxyz(11.4370, 7.6184, 46.2058)
Luminance0.0762 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A40B8 #B8A22A
analogous
#2A87B8 #2A40B8 #5B2AB8
triadic
#2A40B8 #B82A40 #40B82A
tetradic
#2A40B8 #B82A87 #B8A22A #2AB85B
square
#2A40B8 #B82A87 #B8A22A #2AB85B
split-complementary
#2A40B8 #B85B2A #87B82A
monochromatic
#131D54 #1F2F86 #2A40B8 #4A5FD6 #7B8BE1

Accessibility & contrast

On white

8.32
#2A40B8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.52
#2A40B8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A40B8
8.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A40B8#FFFFFF#000000##FFFFFF
##2A40B81.008.322.528.32
#FFFFFF8.321.0021.001.00
#0000002.5221.001.0021.00
##FFFFFF8.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055BC
Deuteranopia (green-blind)
#0047B6
Tritanopia (blue-blind)
#006076
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #2a40b8;
/* rgb */ color: rgb(42, 64, 184);
/* oklch */ color: oklch(43.8% 0.190 268.7);
Tailwind
colors: {
  custom: {
    50: '#7a75ce',
    500: '#2a40b8',
    950: '#000000',
  },
}
SCSS
$custom: #2a40b8;
$custom-light: #7a75ce;
$custom-dark: #000000;
JSON
{
  "hex": "#2a40b8",
  "rgb": {
    "r": 42,
    "g": 64,
    "b": 184
  },
  "hsl": {
    "h": 230.704,
    "s": 62.832,
    "l": 44.314
  },
  "oklch": {
    "l": 0.43771,
    "c": 0.1896,
    "h": 268.7
  },
  "luminance": 0.0762
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2A40B8

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

Preview Lab → · Contrast checker → · Palette generator →

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