#2540B0#2540B0

#2540B0 is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.8% C 0.180 H 267.4°. Best body text is #FFFFFF at 8.61:1 contrast (WCAG AA passes).

Color values

HEX#2540B0
RGBrgb(37, 64, 176)
HSLhsl(228, 65%, 42%)
HSVhsv(228, 79%, 69%)
CMYKcmyk(79%, 63.6%, 0%, 31%)
CIE-LABlab(32.24, 31.43, -62.30)
CIE-LCHlch(32.24, 69.78, 296.77°)
OKLaboklab(42.81% -0.0083 -0.1802)
OKLCHoklch(42.81% 0.18 267.4)
XYZxyz(10.4301, 7.1935, 41.9047)
Luminance0.0720 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540B0 #B09525
analogous
#2586B0 #2540B0 #4F25B0
triadic
#2540B0 #B02540 #40B025
tetradic
#2540B0 #B02586 #B09525 #25B04F
square
#2540B0 #B02586 #B09525 #25B04F
split-complementary
#2540B0 #B04F25 #86B025
monochromatic
#101B4B #1A2E7D #2540B0 #3C5AD6 #6F85E1

Accessibility & contrast

On white

8.61
#2540B0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#2540B0 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540B0
8.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540B0#FFFFFF#000000##FFFFFF
##2540B01.008.612.448.61
#FFFFFF8.611.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B4
Deuteranopia (green-blind)
#0045AE
Tritanopia (blue-blind)
#005D72
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2540b0;
/* rgb */ color: rgb(37, 64, 176);
/* oklch */ color: oklch(42.8% 0.180 267.4);
Tailwind
colors: {
  custom: {
    50: '#7774c9',
    500: '#2540b0',
    950: '#000000',
  },
}
SCSS
$custom: #2540b0;
$custom-light: #7774c9;
$custom-dark: #000000;
JSON
{
  "hex": "#2540b0",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 176
  },
  "hsl": {
    "h": 228.345,
    "s": 65.258,
    "l": 41.765
  },
  "oklch": {
    "l": 0.42807,
    "c": 0.18044,
    "h": 267.4
  },
  "luminance": 0.07195
}

Semantic roles & 50–950 ramp

primary
#2540B0
secondary
#C7B56A
accent
#C740E8
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2540B0

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

Preview Lab → · Contrast checker → · Palette generator →

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