#2540A3#2540A3

#2540A3 is a dark, vivid blue. Relative luminance 0.067; OKLCH L 41.6% C 0.163 H 267.1°. Best body text is #FFFFFF at 8.97:1 contrast (WCAG AA passes).

Color values

HEX#2540A3
RGBrgb(37, 64, 163)
HSLhsl(227, 63%, 39%)
HSVhsv(227, 77%, 64%)
CMYKcmyk(77.3%, 60.7%, 0%, 36.1%)
CIE-LABlab(31.12, 26.50, -56.35)
CIE-LCHlch(31.12, 62.27, 295.19°)
OKLaboklab(41.63% -0.0082 -0.1628)
OKLCHoklch(41.63% 0.163 267.1)
XYZxyz(9.2049, 6.7034, 35.4520)
Luminance0.0670 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540A3 #A38825
analogous
#257FA3 #2540A3 #4925A3
triadic
#2540A3 #A32540 #40A325
tetradic
#2540A3 #A3257F #A38825 #25A349
square
#2540A3 #A3257F #A38825 #25A349
split-complementary
#2540A3 #A34925 #7FA325
monochromatic
#0E193F #1A2C71 #2540A3 #3456D1 #667FDC

Accessibility & contrast

On white

8.97
#2540A3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.34
#2540A3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540A3
8.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540A3#FFFFFF#000000##FFFFFF
##2540A31.008.972.348.97
#FFFFFF8.971.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FA6
Deuteranopia (green-blind)
#0044A1
Tritanopia (blue-blind)
#00596B
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #2540a3;
/* rgb */ color: rgb(37, 64, 163);
/* oklch */ color: oklch(41.6% 0.163 267.1);
Tailwind
colors: {
  custom: {
    50: '#7474bf',
    500: '#2540a3',
    950: '#000000',
  },
}
SCSS
$custom: #2540a3;
$custom-light: #7474bf;
$custom-dark: #000000;
JSON
{
  "hex": "#2540a3",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 163
  },
  "hsl": {
    "h": 227.143,
    "s": 63,
    "l": 39.216
  },
  "oklch": {
    "l": 0.41628,
    "c": 0.16301,
    "h": 267.1
  },
  "luminance": 0.06704
}

Semantic roles & 50–950 ramp

primary
#2540A3
secondary
#C2AD62
accent
#C342E6
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#090812
muted
#7B7B81

Preview Lab

Preview with #2540A3

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

Preview Lab → · Contrast checker → · Palette generator →

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