#2A1F87#2A1F87

#2A1F87 is a dark, vivid blue. Relative luminance 0.032; OKLCH L 33.5% C 0.163 H 277.7°. Best body text is #FFFFFF at 12.77:1 contrast (WCAG AA passes).

Color values

HEX#2A1F87
RGBrgb(42, 31, 135)
HSLhsl(246, 63%, 33%)
HSVhsv(246, 77%, 53%)
CMYKcmyk(68.9%, 77%, 0%, 47.1%)
CIE-LABlab(20.91, 37.95, -55.88)
CIE-LCHlch(20.91, 67.55, 304.18°)
OKLaboklab(33.47% 0.0217 -0.1614)
OKLCHoklch(33.47% 0.163 277.7)
XYZxyz(5.8166, 3.2210, 23.2322)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F87 #7C871F
analogous
#1F4887 #2A1F87 #5E1F87
triadic
#2A1F87 #872A1F #1F872A
tetradic
#2A1F87 #871F48 #7C871F #1F875E
square
#2A1F87 #871F48 #7C871F #1F875E
split-complementary
#2A1F87 #875E1F #48871F
monochromatic
#0B0823 #1B1455 #2A1F87 #392AB9 #594BD6

Accessibility & contrast

On white

12.77
#2A1F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1F87
12.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F87#FFFFFF#000000##FFFFFF
##2A1F871.0012.771.6412.77
#FFFFFF12.771.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368A
Deuteranopia (green-blind)
#002E85
Tritanopia (blue-blind)
#003D51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #2a1f87;
/* rgb */ color: rgb(42, 31, 135);
/* oklch */ color: oklch(33.5% 0.163 277.7);
Tailwind
colors: {
  custom: {
    50: '#725dab',
    500: '#2a1f87',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f87;
$custom-light: #725dab;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f87",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 135
  },
  "hsl": {
    "h": 246.346,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.3347,
    "c": 0.16287,
    "h": 277.7
  },
  "luminance": 0.03221
}

Semantic roles & 50–950 ramp

primary
#2A1F87
secondary
#ADB84A
accent
#E642D4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2A1F87

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

Preview Lab → · Contrast checker → · Palette generator →

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