#2540A6#2540A6

#2540A6 is a dark, vivid blue. Relative luminance 0.068; OKLCH L 41.9% C 0.167 H 267.2°. Best body text is #FFFFFF at 8.89:1 contrast (WCAG AA passes).

Color values

HEX#2540A6
RGBrgb(37, 64, 166)
HSLhsl(227, 64%, 40%)
HSVhsv(227, 78%, 65%)
CMYKcmyk(77.7%, 61.4%, 0%, 34.9%)
CIE-LABlab(31.38, 27.65, -57.74)
CIE-LCHlch(31.38, 64.02, 295.59°)
OKLaboklab(41.9% -0.0082 -0.1669)
OKLCHoklch(41.9% 0.167 267.2)
XYZxyz(9.4769, 6.8122, 36.8844)
Luminance0.0681 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540A6 #A68B25
analogous
#2581A6 #2540A6 #4B25A6
triadic
#2540A6 #A62540 #40A625
tetradic
#2540A6 #A62581 #A68B25 #25A64B
square
#2540A6 #A62581 #A68B25 #25A64B
split-complementary
#2540A6 #A64B25 #81A625
monochromatic
#0F1942 #1A2D74 #2540A6 #3657D2 #6881DD

Accessibility & contrast

On white

8.89
#2540A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#2540A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540A6
8.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540A6#FFFFFF#000000##FFFFFF
##2540A61.008.892.368.89
#FFFFFF8.891.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050A9
Deuteranopia (green-blind)
#0044A4
Tritanopia (blue-blind)
#005A6C
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #2540a6;
/* rgb */ color: rgb(37, 64, 166);
/* oklch */ color: oklch(41.9% 0.167 267.2);
Tailwind
colors: {
  custom: {
    50: '#7474c1',
    500: '#2540a6',
    950: '#000000',
  },
}
SCSS
$custom: #2540a6;
$custom-light: #7474c1;
$custom-dark: #000000;
JSON
{
  "hex": "#2540a6",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 166
  },
  "hsl": {
    "h": 227.442,
    "s": 63.547,
    "l": 39.804
  },
  "oklch": {
    "l": 0.41896,
    "c": 0.16708,
    "h": 267.2
  },
  "luminance": 0.06813
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2540A6

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

Preview Lab → · Contrast checker → · Palette generator →

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