#2540A7#2540A7

#2540A7 is a dark, vivid blue. Relative luminance 0.069; OKLCH L 42.0% C 0.168 H 267.2°. Best body text is #FFFFFF at 8.86:1 contrast (WCAG AA passes).

Color values

HEX#2540A7
RGBrgb(37, 64, 167)
HSLhsl(228, 64%, 40%)
HSVhsv(228, 78%, 65%)
CMYKcmyk(77.8%, 61.7%, 0%, 34.5%)
CIE-LABlab(31.46, 28.03, -58.20)
CIE-LCHlch(31.46, 64.60, 295.72°)
OKLaboklab(41.99% -0.0082 -0.1682)
OKLCHoklch(41.99% 0.168 267.2)
XYZxyz(9.5690, 6.8491, 37.3694)
Luminance0.0685 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540A7 #A78C25
analogous
#2581A7 #2540A7 #4B25A7
triadic
#2540A7 #A72540 #40A725
tetradic
#2540A7 #A72581 #A78C25 #25A74B
square
#2540A7 #A72581 #A78C25 #25A74B
split-complementary
#2540A7 #A74B25 #81A725
monochromatic
#0F1A43 #1A2D75 #2540A7 #3757D3 #6981DE

Accessibility & contrast

On white

8.86
#2540A7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#2540A7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540A7
8.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540A7#FFFFFF#000000##FFFFFF
##2540A71.008.862.378.86
#FFFFFF8.861.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050AA
Deuteranopia (green-blind)
#0044A5
Tritanopia (blue-blind)
#005A6D
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2540a7;
/* rgb */ color: rgb(37, 64, 167);
/* oklch */ color: oklch(42.0% 0.168 267.2);
Tailwind
colors: {
  custom: {
    50: '#7574c2',
    500: '#2540a7',
    950: '#000000',
  },
}
SCSS
$custom: #2540a7;
$custom-light: #7574c2;
$custom-dark: #000000;
JSON
{
  "hex": "#2540a7",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 167
  },
  "hsl": {
    "h": 227.538,
    "s": 63.725,
    "l": 40
  },
  "oklch": {
    "l": 0.41986,
    "c": 0.16843,
    "h": 267.2
  },
  "luminance": 0.0685
}

Semantic roles & 50–950 ramp

primary
#2540A7
secondary
#C4B064
accent
#C441E7
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0812
muted
#7C7B81

Preview Lab

Preview with #2540A7

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

Preview Lab → · Contrast checker → · Palette generator →

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