#2A1271#2A1271

#2A1271 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.4% C 0.148 H 284.2°. Best body text is #FFFFFF at 14.75:1 contrast (WCAG AA passes).

Color values

HEX#2A1271
RGBrgb(42, 18, 113)
HSLhsl(255, 73%, 26%)
HSVhsv(255, 84%, 44%)
CMYKcmyk(62.8%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.09, 37.76, -49.79)
CIE-LCHlch(16.09, 62.49, 307.18°)
OKLaboklab(29.38% 0.0362 -0.1435)
OKLCHoklch(29.38% 0.148 284.2)
XYZxyz(4.1509, 2.1168, 15.8094)
Luminance0.0212 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1271 #597112
analogous
#122971 #2A1271 #591271
triadic
#2A1271 #712A12 #12712A
tetradic
#2A1271 #711229 #597112 #127159
square
#2A1271 #711229 #597112 #127159
split-complementary
#2A1271 #715912 #297112
monochromatic
#0A041A #160A3C #2A1271 #3E1AA6 #5123DB

Accessibility & contrast

On white

14.75
#2A1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2A1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1271
14.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1271#FFFFFF#000000##FFFFFF
##2A12711.0014.751.4214.75
#FFFFFF14.751.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00256F
Tritanopia (blue-blind)
#002F42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a1271;
/* rgb */ color: rgb(42, 18, 113);
/* oklch */ color: oklch(29.4% 0.148 284.2);
Tailwind
colors: {
  custom: {
    50: '#6e549b',
    500: '#2a1271',
    950: '#000000',
  },
}
SCSS
$custom: #2a1271;
$custom-light: #6e549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1271",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 255.158,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29376,
    "c": 0.14803,
    "h": 284.2
  },
  "luminance": 0.02117
}

Semantic roles & 50–950 ramp

primary
#2A1271
secondary
#8BA837
accent
#EF39C1
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1271

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

Preview Lab → · Contrast checker → · Palette generator →

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