#2840AF#2840AF

#2840AF is a dark, vivid blue. Relative luminance 0.072; OKLCH L 42.8% C 0.178 H 268.2°. Best body text is #FFFFFF at 8.60:1 contrast (WCAG AA passes).

Color values

HEX#2840AF
RGBrgb(40, 64, 175)
HSLhsl(229, 63%, 42%)
HSVhsv(229, 77%, 69%)
CMYKcmyk(77.1%, 63.4%, 0%, 31.4%)
CIE-LABlab(32.28, 31.36, -61.63)
CIE-LCHlch(32.28, 69.15, 296.97°)
OKLaboklab(42.85% -0.0056 -0.1782)
OKLCHoklch(42.85% 0.178 268.2)
XYZxyz(10.4436, 7.2119, 41.3907)
Luminance0.0721 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2840AF #AF9728
analogous
#2884AF #2840AF #5328AF
triadic
#2840AF #AF2840 #40AF28
tetradic
#2840AF #AF2884 #AF9728 #28AF53
square
#2840AF #AF2884 #AF9728 #28AF53
split-complementary
#2840AF #AF5328 #84AF28
monochromatic
#111C4B #1D2E7D #2840AF #415BD4 #7386DF

Accessibility & contrast

On white

8.60
#2840AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.44
#2840AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2840AF
8.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2840AF#FFFFFF#000000##FFFFFF
##2840AF1.008.602.448.60
#FFFFFF8.601.0021.001.00
#0000002.4421.001.0021.00
##FFFFFF8.601.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2840af;
/* rgb */ color: rgb(40, 64, 175);
/* oklch */ color: oklch(42.8% 0.178 268.2);
Tailwind
colors: {
  custom: {
    50: '#7874c8',
    500: '#2840af',
    950: '#000000',
  },
}
SCSS
$custom: #2840af;
$custom-light: #7874c8;
$custom-dark: #000000;
JSON
{
  "hex": "#2840af",
  "rgb": {
    "r": 40,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 229.333,
    "s": 62.791,
    "l": 42.157
  },
  "oklch": {
    "l": 0.42846,
    "c": 0.17832,
    "h": 268.2
  },
  "luminance": 0.07213
}

Semantic roles & 50–950 ramp

primary
#2840AF
secondary
#C6B66D
accent
#C942E6
background
#F7F7FC
surface
#EEEDF8
border
#C9C8D1
text
#0A0813
muted
#7C7B82

Preview Lab

Preview with #2840AF

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

Preview Lab → · Contrast checker → · Palette generator →

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