#2A2871#2A2871

#2A2871 is a dark, vivid blue. Relative luminance 0.032; OKLCH L 32.8% C 0.122 H 278.5°. Best body text is #FFFFFF at 12.80:1 contrast (WCAG AA passes).

Color values

HEX#2A2871
RGBrgb(42, 40, 113)
HSLhsl(242, 48%, 30%)
HSVhsv(242, 65%, 44%)
CMYKcmyk(62.8%, 64.6%, 0%, 55.7%)
CIE-LABlab(20.83, 24.67, -42.01)
CIE-LCHlch(20.83, 48.72, 300.42°)
OKLaboklab(32.77% 0.018 -0.1208)
OKLCHoklch(32.77% 0.122 278.5)
XYZxyz(4.6933, 3.2017, 15.9903)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A2871 #6F7128
analogous
#284A71 #2A2871 #4F2871
triadic
#2A2871 #712A28 #28712A
tetradic
#2A2871 #71284A #6F7128 #28714F
square
#2A2871 #71284A #6F7128 #28714F
split-complementary
#2A2871 #714F28 #4A7128
monochromatic
#080817 #191844 #2A2871 #3B389E #5552C2

Accessibility & contrast

On white

12.80
#2A2871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#2A2871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A2871
12.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A2871#FFFFFF#000000##FFFFFF
##2A28711.0012.801.6412.80
#FFFFFF12.801.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003573
Deuteranopia (green-blind)
#002F70
Tritanopia (blue-blind)
#003A48
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #2a2871;
/* rgb */ color: rgb(42, 40, 113);
/* oklch */ color: oklch(32.8% 0.122 278.5);
Tailwind
colors: {
  custom: {
    50: '#6c629a',
    500: '#2a2871',
    950: '#000000',
  },
}
SCSS
$custom: #2a2871;
$custom-light: #6c629a;
$custom-dark: #000000;
JSON
{
  "hex": "#2a2871",
  "rgb": {
    "r": 42,
    "g": 40,
    "b": 113
  },
  "hsl": {
    "h": 241.644,
    "s": 47.712,
    "l": 30
  },
  "oklch": {
    "l": 0.32766,
    "c": 0.12216,
    "h": 278.5
  },
  "luminance": 0.03202
}

Semantic roles & 50–950 ramp

primary
#2A2871
secondary
#A1A352
accent
#D750D4
background
#F6F5F9
surface
#ECEAF2
border
#C7C6CC
text
#07050E
muted
#7A797E

Preview Lab

Preview with #2A2871

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

Preview Lab → · Contrast checker → · Palette generator →

#2A2871 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva