#2A1581#2A1581

#2A1581 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.165 H 280.2°. Best body text is #FFFFFF at 13.79:1 contrast (WCAG AA passes).

Color values

HEX#2A1581
RGBrgb(42, 21, 129)
HSLhsl(252, 72%, 29%)
HSVhsv(252, 84%, 51%)
CMYKcmyk(67.4%, 83.7%, 0%, 49.4%)
CIE-LABlab(18.42, 41.25, -56.20)
CIE-LCHlch(18.42, 69.71, 306.28°)
OKLaboklab(31.54% 0.0291 -0.1622)
OKLCHoklch(31.54% 0.165 280.2)
XYZxyz(5.1842, 2.6131, 20.9958)
Luminance0.0261 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1581 #6C8115
analogous
#153681 #2A1581 #601581
triadic
#2A1581 #812A15 #15812A
tetradic
#2A1581 #811536 #6C8115 #158160
square
#2A1581 #811536 #6C8115 #158160
split-complementary
#2A1581 #816015 #368115
monochromatic
#09041A #190C4C #2A1581 #3B1EB6 #5433DE

Accessibility & contrast

On white

13.79
#2A1581 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2A1581 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1581
13.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1581#FFFFFF#000000##FFFFFF
##2A15811.0013.791.5213.79
#FFFFFF13.791.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003184
Deuteranopia (green-blind)
#00297F
Tritanopia (blue-blind)
#00374C
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2a1581;
/* rgb */ color: rgb(42, 21, 129);
/* oklch */ color: oklch(31.5% 0.165 280.2);
Tailwind
colors: {
  custom: {
    50: '#7157a7',
    500: '#2a1581',
    950: '#000000',
  },
}
SCSS
$custom: #2a1581;
$custom-light: #7157a7;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1581",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 129
  },
  "hsl": {
    "h": 251.667,
    "s": 72,
    "l": 29.412
  },
  "oklch": {
    "l": 0.31535,
    "c": 0.16481,
    "h": 280.2
  },
  "luminance": 0.02614
}

Semantic roles & 50–950 ramp

primary
#2A1581
secondary
#9EB63C
accent
#EF39CB
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2A1581

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

Preview Lab → · Contrast checker → · Palette generator →

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