#2540B4#2540B4

#2540B4 is a dark, vivid blue. Relative luminance 0.074; OKLCH L 43.2% C 0.186 H 267.4°. Best body text is #FFFFFF at 8.50:1 contrast (WCAG AA passes).

Color values

HEX#2540B4
RGBrgb(37, 64, 180)
HSLhsl(229, 66%, 43%)
HSVhsv(229, 79%, 71%)
CMYKcmyk(79.4%, 64.4%, 0%, 29.4%)
CIE-LABlab(32.60, 32.93, -64.09)
CIE-LCHlch(32.60, 72.06, 297.19°)
OKLaboklab(43.18% -0.0084 -0.1855)
OKLCHoklch(43.18% 0.186 267.4)
XYZxyz(10.8317, 7.3541, 44.0198)
Luminance0.0736 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540B4 #B49925
analogous
#2588B4 #2540B4 #5125B4
triadic
#2540B4 #B42540 #40B425
tetradic
#2540B4 #B42588 #B49925 #25B451
square
#2540B4 #B42588 #B49925 #25B451
split-complementary
#2540B4 #B45125 #88B425
monochromatic
#101C4E #1B2E81 #2540B4 #3F5CD7 #7187E2

Accessibility & contrast

On white

8.50
#2540B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.47
#2540B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540B4
8.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540B4#FFFFFF#000000##FFFFFF
##2540B41.008.502.478.50
#FFFFFF8.501.0021.001.00
#0000002.4721.001.0021.00
##FFFFFF8.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B8
Deuteranopia (green-blind)
#0046B2
Tritanopia (blue-blind)
#005F74
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #2540b4;
/* rgb */ color: rgb(37, 64, 180);
/* oklch */ color: oklch(43.2% 0.186 267.4);
Tailwind
colors: {
  custom: {
    50: '#7874cb',
    500: '#2540b4',
    950: '#000000',
  },
}
SCSS
$custom: #2540b4;
$custom-light: #7874cb;
$custom-dark: #000000;
JSON
{
  "hex": "#2540b4",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 180
  },
  "hsl": {
    "h": 228.671,
    "s": 65.899,
    "l": 42.549
  },
  "oklch": {
    "l": 0.43179,
    "c": 0.18568,
    "h": 267.4
  },
  "luminance": 0.07355
}

Semantic roles & 50–950 ramp

primary
#2540B4
secondary
#C9B76C
accent
#C93FE9
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2540B4

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

Preview Lab → · Contrast checker → · Palette generator →

#2540B4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva