#2540AF#2540AF

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

Color values

HEX#2540AF
RGBrgb(37, 64, 175)
HSLhsl(228, 65%, 42%)
HSVhsv(228, 79%, 69%)
CMYKcmyk(78.9%, 63.4%, 0%, 31.4%)
CIE-LABlab(32.16, 31.06, -61.85)
CIE-LCHlch(32.16, 69.21, 296.66°)
OKLaboklab(42.71% -0.0083 -0.1789)
OKLCHoklch(42.71% 0.179 267.4)
XYZxyz(10.3315, 7.1541, 41.3855)
Luminance0.0716 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540AF #AF9425
analogous
#2585AF #2540AF #4F25AF
triadic
#2540AF #AF2540 #40AF25
tetradic
#2540AF #AF2585 #AF9425 #25AF4F
square
#2540AF #AF2585 #AF9425 #25AF4F
split-complementary
#2540AF #AF4F25 #85AF25
monochromatic
#101B4A #1A2E7C #2540AF #3C5AD6 #6E84E0

Accessibility & contrast

On white

8.64
#2540AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.43
#2540AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540AF
8.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540AF#FFFFFF#000000##FFFFFF
##2540AF1.008.642.438.64
#FFFFFF8.641.0021.001.00
#0000002.4321.001.0021.00
##FFFFFF8.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052B3
Deuteranopia (green-blind)
#0045AD
Tritanopia (blue-blind)
#005D71
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #2540af;
/* rgb */ color: rgb(37, 64, 175);
/* oklch */ color: oklch(42.7% 0.179 267.4);
Tailwind
colors: {
  custom: {
    50: '#7774c8',
    500: '#2540af',
    950: '#000000',
  },
}
SCSS
$custom: #2540af;
$custom-light: #7774c8;
$custom-dark: #000000;
JSON
{
  "hex": "#2540af",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 228.261,
    "s": 65.094,
    "l": 41.569
  },
  "oklch": {
    "l": 0.42714,
    "c": 0.17912,
    "h": 267.4
  },
  "luminance": 0.07155
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #2540AF

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

Preview Lab → · Contrast checker → · Palette generator →

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