#2540B2#2540B2

#2540B2 is a dark, vivid blue. Relative luminance 0.073; OKLCH L 43.0% C 0.183 H 267.4°. Best body text is #FFFFFF at 8.55:1 contrast (WCAG AA passes).

Color values

HEX#2540B2
RGBrgb(37, 64, 178)
HSLhsl(229, 66%, 42%)
HSVhsv(229, 79%, 70%)
CMYKcmyk(79.2%, 64%, 0%, 30.2%)
CIE-LABlab(32.42, 32.18, -63.20)
CIE-LCHlch(32.42, 70.92, 296.99°)
OKLaboklab(42.99% -0.0083 -0.1829)
OKLCHoklch(42.99% 0.183 267.4)
XYZxyz(10.6294, 7.2732, 42.9545)
Luminance0.0727 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540B2 #B29725
analogous
#2586B2 #2540B2 #5125B2
triadic
#2540B2 #B22540 #40B225
tetradic
#2540B2 #B22586 #B29725 #25B251
square
#2540B2 #B22586 #B29725 #25B251
split-complementary
#2540B2 #B25125 #86B225
monochromatic
#101C4D #1A2E7F #2540B2 #3D5BD7 #7086E1

Accessibility & contrast

On white

8.55
#2540B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.45
#2540B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540B2
8.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540B2#FFFFFF#000000##FFFFFF
##2540B21.008.552.458.55
#FFFFFF8.551.0021.001.00
#0000002.4521.001.0021.00
##FFFFFF8.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B6
Deuteranopia (green-blind)
#0046B0
Tritanopia (blue-blind)
#005E73
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2540b2;
/* rgb */ color: rgb(37, 64, 178);
/* oklch */ color: oklch(43.0% 0.183 267.4);
Tailwind
colors: {
  custom: {
    50: '#7774ca',
    500: '#2540b2',
    950: '#000000',
  },
}
SCSS
$custom: #2540b2;
$custom-light: #7774ca;
$custom-dark: #000000;
JSON
{
  "hex": "#2540b2",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 228.511,
    "s": 65.581,
    "l": 42.157
  },
  "oklch": {
    "l": 0.42992,
    "c": 0.18307,
    "h": 267.4
  },
  "luminance": 0.07274
}

Semantic roles & 50–950 ramp

primary
#2540B2
secondary
#C8B66B
accent
#C83FE9
background
#F8F7FC
surface
#EFEDF9
border
#CAC8D2
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2540B2

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

Preview Lab → · Contrast checker → · Palette generator →

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