#2A1F71#2A1F71

#2A1F71 is a dark, vivid blue. Relative luminance 0.027; OKLCH L 31.2% C 0.134 H 281.4°. Best body text is #FFFFFF at 13.70:1 contrast (WCAG AA passes).

Color values

HEX#2A1F71
RGBrgb(42, 31, 113)
HSLhsl(248, 57%, 28%)
HSVhsv(248, 73%, 44%)
CMYKcmyk(62.8%, 72.6%, 0%, 55.7%)
CIE-LABlab(18.65, 30.53, -45.59)
CIE-LCHlch(18.65, 54.87, 303.81°)
OKLaboklab(31.18% 0.0264 -0.1313)
OKLCHoklch(31.18% 0.134 281.4)
XYZxyz(4.4245, 2.6642, 15.9007)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1F71 #66711F
analogous
#1F3D71 #2A1F71 #531F71
triadic
#2A1F71 #712A1F #1F712A
tetradic
#2A1F71 #711F3D #66711F #1F7153
square
#2A1F71 #711F3D #66711F #1F7153
split-complementary
#2A1F71 #71531F #3D711F
monochromatic
#090718 #181241 #2A1F71 #3C2CA1 #5240CB

Accessibility & contrast

On white

13.70
#2A1F71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2A1F71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1F71
13.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1F71#FFFFFF#000000##FFFFFF
##2A1F711.0013.701.5313.70
#FFFFFF13.701.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003073
Deuteranopia (green-blind)
#002A6F
Tritanopia (blue-blind)
#003545
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2a1f71;
/* rgb */ color: rgb(42, 31, 113);
/* oklch */ color: oklch(31.2% 0.134 281.4);
Tailwind
colors: {
  custom: {
    50: '#6d5c9b',
    500: '#2a1f71',
    950: '#000000',
  },
}
SCSS
$custom: #2a1f71;
$custom-light: #6d5c9b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1f71",
  "rgb": {
    "r": 42,
    "g": 31,
    "b": 113
  },
  "hsl": {
    "h": 248.049,
    "s": 56.944,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31178,
    "c": 0.13398,
    "h": 281.4
  },
  "luminance": 0.02664
}

Semantic roles & 50–950 ramp

primary
#2A1F71
secondary
#98A547
accent
#E048CC
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08040E
muted
#7A797E

Preview Lab

Preview with #2A1F71

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

Preview Lab → · Contrast checker → · Palette generator →

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