#2540B1#2540B1

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

Color values

HEX#2540B1
RGBrgb(37, 64, 177)
HSLhsl(228, 65%, 42%)
HSVhsv(228, 79%, 69%)
CMYKcmyk(79.1%, 63.8%, 0%, 30.6%)
CIE-LABlab(32.33, 31.81, -62.75)
CIE-LCHlch(32.33, 70.35, 296.88°)
OKLaboklab(42.9% -0.0083 -0.1816)
OKLCHoklch(42.9% 0.182 267.4)
XYZxyz(10.5294, 7.2332, 42.4277)
Luminance0.0723 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540B1 #B19625
analogous
#2586B1 #2540B1 #5025B1
triadic
#2540B1 #B12540 #40B125
tetradic
#2540B1 #B12586 #B19625 #25B150
square
#2540B1 #B12586 #B19625 #25B150
split-complementary
#2540B1 #B15025 #86B125
monochromatic
#101B4C #1A2E7E #2540B1 #3D5AD6 #6F85E1

Accessibility & contrast

On white

8.58
#2540B1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2540B1
8.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540B1#FFFFFF#000000##FFFFFF
##2540B11.008.582.458.58
#FFFFFF8.581.0021.001.00
#0000002.4521.001.0021.00
##FFFFFF8.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053B5
Deuteranopia (green-blind)
#0046AF
Tritanopia (blue-blind)
#005E72
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2540b1;
/* rgb */ color: rgb(37, 64, 177);
/* oklch */ color: oklch(42.9% 0.182 267.4);
Tailwind
colors: {
  custom: {
    50: '#7774c9',
    500: '#2540b1',
    950: '#000000',
  },
}
SCSS
$custom: #2540b1;
$custom-light: #7774c9;
$custom-dark: #000000;
JSON
{
  "hex": "#2540b1",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 177
  },
  "hsl": {
    "h": 228.429,
    "s": 65.421,
    "l": 41.961
  },
  "oklch": {
    "l": 0.42899,
    "c": 0.18175,
    "h": 267.4
  },
  "luminance": 0.07234
}

Semantic roles & 50–950 ramp

primary
#2540B1
secondary
#C8B66A
accent
#C83FE8
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2540B1

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

Preview Lab → · Contrast checker → · Palette generator →

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