#2540A2#2540A2

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

Color values

HEX#2540A2
RGBrgb(37, 64, 162)
HSLhsl(227, 63%, 39%)
HSVhsv(227, 77%, 64%)
CMYKcmyk(77.2%, 60.5%, 0%, 36.5%)
CIE-LABlab(31.04, 26.12, -55.88)
CIE-LCHlch(31.04, 61.68, 295.05°)
OKLaboklab(41.54% -0.0082 -0.1614)
OKLCHoklch(41.54% 0.162 267.1)
XYZxyz(9.1157, 6.6677, 34.9820)
Luminance0.0667 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540A2 #A28725
analogous
#257FA2 #2540A2 #4925A2
triadic
#2540A2 #A22540 #40A225
tetradic
#2540A2 #A2257F #A28725 #25A249
square
#2540A2 #A2257F #A28725 #25A249
split-complementary
#2540A2 #A24925 #7FA225
monochromatic
#0E193E #1A2C70 #2540A2 #3456D1 #657FDC

Accessibility & contrast

On white

9.00
#2540A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#2540A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540A2
9.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540A2#FFFFFF#000000##FFFFFF
##2540A21.009.002.339.00
#FFFFFF9.001.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FA5
Deuteranopia (green-blind)
#0043A0
Tritanopia (blue-blind)
#00596A
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #2540a2;
/* rgb */ color: rgb(37, 64, 162);
/* oklch */ color: oklch(41.5% 0.162 267.1);
Tailwind
colors: {
  custom: {
    50: '#7374be',
    500: '#2540a2',
    950: '#000000',
  },
}
SCSS
$custom: #2540a2;
$custom-light: #7374be;
$custom-dark: #000000;
JSON
{
  "hex": "#2540a2",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 227.04,
    "s": 62.814,
    "l": 39.02
  },
  "oklch": {
    "l": 0.4154,
    "c": 0.16164,
    "h": 267.1
  },
  "luminance": 0.06669
}

Semantic roles & 50–950 ramp

primary
#2540A2
secondary
#C2AD61
accent
#C242E6
background
#F7F7FB
surface
#EEEDF7
border
#C9C8D0
text
#090812
muted
#7B7B81

Preview Lab

Preview with #2540A2

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

Preview Lab → · Contrast checker → · Palette generator →

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