#2540C4#2540C4

#2540C4 is a dark, highly saturated blue. Relative luminance 0.080; OKLCH L 44.7% C 0.206 H 267.4°. Best body text is #FFFFFF at 8.05:1 contrast (WCAG AA passes).

Color values

HEX#2540C4
RGBrgb(37, 64, 196)
HSLhsl(230, 68%, 46%)
HSVhsv(230, 81%, 77%)
CMYKcmyk(81.1%, 67.3%, 0%, 23.1%)
CIE-LABlab(34.07, 38.81, -71.09)
CIE-LCHlch(34.07, 81.00, 298.63°)
OKLaboklab(44.71% -0.0092 -0.2059)
OKLCHoklch(44.71% 0.206 267.4)
XYZxyz(12.5567, 8.0441, 53.1047)
Luminance0.0805 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2540C4 #C4A925
analogous
#258FC4 #2540C4 #5925C4
triadic
#2540C4 #C42540 #40C425
tetradic
#2540C4 #C4258F #C4A925 #25C459
square
#2540C4 #C4258F #C4A925 #25C459
split-complementary
#2540C4 #C45925 #8FC425
monochromatic
#121E5D #1B2F91 #2540C4 #4962DD #7D8FE6

Accessibility & contrast

On white

8.05
#2540C4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.61
#2540C4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2540C4
8.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2540C4#FFFFFF#000000##FFFFFF
##2540C41.008.052.618.05
#FFFFFF8.051.0021.001.00
#0000002.6121.001.0021.00
##FFFFFF8.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058C8
Deuteranopia (green-blind)
#0049C2
Tritanopia (blue-blind)
#00647C
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #2540c4;
/* rgb */ color: rgb(37, 64, 196);
/* oklch */ color: oklch(44.7% 0.206 267.4);
Tailwind
colors: {
  custom: {
    50: '#7c75d7',
    500: '#2540c4',
    950: '#000000',
  },
}
SCSS
$custom: #2540c4;
$custom-light: #7c75d7;
$custom-dark: #000000;
JSON
{
  "hex": "#2540c4",
  "rgb": {
    "r": 37,
    "g": 64,
    "b": 196
  },
  "hsl": {
    "h": 229.811,
    "s": 68.24,
    "l": 45.686
  },
  "oklch": {
    "l": 0.44709,
    "c": 0.20615,
    "h": 267.4
  },
  "luminance": 0.08046
}

Semantic roles & 50–950 ramp

primary
#2540C4
secondary
#CFC076
accent
#CD3DEB
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0B0815
muted
#7C7B83

Preview Lab

Preview with #2540C4

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

Preview Lab → · Contrast checker → · Palette generator →

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