#2A40B7#2A40B7

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

Color values

HEX#2A40B7
RGBrgb(42, 64, 183)
HSLhsl(231, 63%, 44%)
HSVhsv(231, 77%, 72%)
CMYKcmyk(77%, 65%, 0%, 28.2%)
CIE-LABlab(33.09, 34.52, -65.07)
CIE-LCHlch(33.09, 73.65, 297.95°)
OKLaboklab(43.68% -0.0041 -0.1882)
OKLCHoklch(43.68% 0.188 268.7)
XYZxyz(11.3325, 7.5767, 45.6557)
Luminance0.0758 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A40B7 #B7A12A
analogous
#2A87B7 #2A40B7 #5A2AB7
triadic
#2A40B7 #B72A40 #40B72A
tetradic
#2A40B7 #B72A87 #B7A12A #2AB75A
square
#2A40B7 #B72A87 #B7A12A #2AB75A
split-complementary
#2A40B7 #B75A2A #87B72A
monochromatic
#131D53 #1F2F85 #2A40B7 #495FD5 #7B8BE1

Accessibility & contrast

On white

8.35
#2A40B7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A40B7
8.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A40B7#FFFFFF#000000##FFFFFF
##2A40B71.008.352.528.35
#FFFFFF8.351.0021.001.00
#0000002.5221.001.0021.00
##FFFFFF8.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055BB
Deuteranopia (green-blind)
#0047B5
Tritanopia (blue-blind)
#006075
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #2a40b7;
/* rgb */ color: rgb(42, 64, 183);
/* oklch */ color: oklch(43.7% 0.188 268.7);
Tailwind
colors: {
  custom: {
    50: '#7a74ce',
    500: '#2a40b7',
    950: '#000000',
  },
}
SCSS
$custom: #2a40b7;
$custom-light: #7a74ce;
$custom-dark: #000000;
JSON
{
  "hex": "#2a40b7",
  "rgb": {
    "r": 42,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 230.638,
    "s": 62.667,
    "l": 44.118
  },
  "oklch": {
    "l": 0.43678,
    "c": 0.1883,
    "h": 268.7
  },
  "luminance": 0.07578
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2A40B7

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

Preview Lab → · Contrast checker → · Palette generator →

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