#2540A8#2540A8

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

Color values

HEX#2540A8
RGBrgb(37, 64, 168)
HSLhsl(228, 64%, 40%)
HSVhsv(228, 78%, 66%)
CMYKcmyk(78%, 61.9%, 0%, 34.1%)
CIE-LABlab(31.55, 28.41, -58.66)
CIE-LCHlch(31.55, 65.18, 295.84°)
OKLaboklab(42.08% -0.0082 -0.1696)
OKLCHoklch(42.08% 0.17 267.2)
XYZxyz(9.6618, 6.8862, 37.8582)
Luminance0.0689 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540A8 #A88D25
analogous
#2581A8 #2540A8 #4C25A8
triadic
#2540A8 #A82540 #40A825
tetradic
#2540A8 #A82581 #A88D25 #25A84C
square
#2540A8 #A82581 #A88D25 #25A84C
split-complementary
#2540A8 #A84C25 #81A825
monochromatic
#0F1A44 #1A2D76 #2540A8 #3757D3 #6981DE

Accessibility & contrast

On white

8.83
#2540A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.38
#2540A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540A8
8.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540A8#FFFFFF#000000##FFFFFF
##2540A81.008.832.388.83
#FFFFFF8.831.0021.001.00
#0000002.3821.001.0021.00
##FFFFFF8.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051AB
Deuteranopia (green-blind)
#0044A6
Tritanopia (blue-blind)
#005B6E
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2540a8;
/* rgb */ color: rgb(37, 64, 168);
/* oklch */ color: oklch(42.1% 0.170 267.2);
Tailwind
colors: {
  custom: {
    50: '#7574c3',
    500: '#2540a8',
    950: '#000000',
  },
}
SCSS
$custom: #2540a8;
$custom-light: #7574c3;
$custom-dark: #000000;
JSON
{
  "hex": "#2540a8",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 168
  },
  "hsl": {
    "h": 227.634,
    "s": 63.902,
    "l": 40.196
  },
  "oklch": {
    "l": 0.42076,
    "c": 0.16978,
    "h": 267.2
  },
  "luminance": 0.06887
}

Semantic roles & 50–950 ramp

primary
#2540A8
secondary
#C4B065
accent
#C541E7
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2540A8

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

Preview Lab → · Contrast checker → · Palette generator →

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