#2A1171#2A1171

#2A1171 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.3% C 0.149 H 284.3°. Best body text is #FFFFFF at 14.82:1 contrast (WCAG AA passes).

Color values

HEX#2A1171
RGBrgb(42, 17, 113)
HSLhsl(256, 74%, 25%)
HSVhsv(256, 85%, 44%)
CMYKcmyk(62.8%, 85%, 0%, 55.7%)
CIE-LABlab(15.93, 38.23, -50.06)
CIE-LCHlch(15.93, 62.99, 307.37°)
OKLaboklab(29.27% 0.0368 -0.1443)
OKLCHoklch(29.27% 0.149 284.3)
XYZxyz(4.1350, 2.0851, 15.8042)
Luminance0.0209 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1171 #587111
analogous
#112871 #2A1171 #5A1171
triadic
#2A1171 #712A11 #11712A
tetradic
#2A1171 #711128 #587111 #11715A
square
#2A1171 #711128 #587111 #11715A
split-complementary
#2A1171 #715A11 #287111
monochromatic
#0A041B #16093C #2A1171 #3E19A6 #5221DB

Accessibility & contrast

On white

14.82
#2A1171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1171
14.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1171#FFFFFF#000000##FFFFFF
##2A11711.0014.821.4214.82
#FFFFFF14.821.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.821.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a1171;
/* rgb */ color: rgb(42, 17, 113);
/* oklch */ color: oklch(29.3% 0.149 284.3);
Tailwind
colors: {
  custom: {
    50: '#6e549b',
    500: '#2a1171',
    950: '#000000',
  },
}
SCSS
$custom: #2a1171;
$custom-light: #6e549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1171",
  "rgb": {
    "r": 42,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 255.625,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.29265,
    "c": 0.14892,
    "h": 284.3
  },
  "luminance": 0.02085
}

Semantic roles & 50–950 ramp

primary
#2A1171
secondary
#8AA836
accent
#F137C0
background
#F7F4F9
surface
#EDE8F2
border
#C8C4CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1171

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

Preview Lab → · Contrast checker → · Palette generator →

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