#2A1781#2A1781

#2A1781 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.8% C 0.163 H 279.9°. Best body text is #FFFFFF at 13.65:1 contrast (WCAG AA passes).

Color values

HEX#2A1781
RGBrgb(42, 23, 129)
HSLhsl(251, 70%, 30%)
HSVhsv(251, 82%, 51%)
CMYKcmyk(67.4%, 82.2%, 0%, 49.4%)
CIE-LABlab(18.76, 40.28, -55.65)
CIE-LCHlch(18.76, 68.69, 305.90°)
OKLaboklab(31.77% 0.028 -0.1606)
OKLCHoklch(31.77% 0.163 279.9)
XYZxyz(5.2224, 2.6896, 21.0086)
Luminance0.0269 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1781 #6E8117
analogous
#173981 #2A1781 #5F1781
triadic
#2A1781 #812A17 #17812A
tetradic
#2A1781 #811739 #6E8117 #17815F
square
#2A1781 #811739 #6E8117 #17815F
split-complementary
#2A1781 #815F17 #398117
monochromatic
#08051A #190E4D #2A1781 #3B20B5 #5537DB

Accessibility & contrast

On white

13.65
#2A1781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.54
#2A1781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1781
13.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1781#FFFFFF#000000##FFFFFF
##2A17811.0013.651.5413.65
#FFFFFF13.651.0021.001.00
#0000001.5421.001.0021.00
##FFFFFF13.651.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a1781;
/* rgb */ color: rgb(42, 23, 129);
/* oklch */ color: oklch(31.8% 0.163 279.9);
Tailwind
colors: {
  custom: {
    50: '#7158a7',
    500: '#2a1781',
    950: '#000000',
  },
}
SCSS
$custom: #2a1781;
$custom-light: #7158a7;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1781",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 250.755,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.31766,
    "c": 0.16307,
    "h": 279.9
  },
  "luminance": 0.0269
}

Semantic roles & 50–950 ramp

primary
#2A1781
secondary
#A0B53E
accent
#ED3BCD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2A1781

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

Preview Lab → · Contrast checker → · Palette generator →

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