#2A1572#2A1572

#2A1572 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.8% C 0.146 H 283.4°. Best body text is #FFFFFF at 14.50:1 contrast (WCAG AA passes).

Color values

HEX#2A1572
RGBrgb(42, 21, 114)
HSLhsl(254, 69%, 26%)
HSVhsv(254, 82%, 45%)
CMYKcmyk(63.2%, 81.6%, 0%, 55.3%)
CIE-LABlab(16.71, 36.58, -49.41)
CIE-LCHlch(16.71, 61.48, 306.52°)
OKLaboklab(29.84% 0.0339 -0.1424)
OKLCHoklch(29.84% 0.146 283.4)
XYZxyz(4.2593, 2.2432, 16.1249)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1572 #5D7215
analogous
#152F72 #2A1572 #591572
triadic
#2A1572 #722A15 #15722A
tetradic
#2A1572 #72152F #5D7215 #157259
square
#2A1572 #72152F #5D7215 #157259
split-complementary
#2A1572 #725915 #2F7215
monochromatic
#0A051A #170B3E #2A1572 #3D1FA6 #512AD8

Accessibility & contrast

On white

14.50
#2A1572 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2A1572 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1572
14.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1572#FFFFFF#000000##FFFFFF
##2A15721.0014.501.4514.50
#FFFFFF14.501.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C75
Deuteranopia (green-blind)
#002670
Tritanopia (blue-blind)
#003043
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2a1572;
/* rgb */ color: rgb(42, 21, 114);
/* oklch */ color: oklch(29.8% 0.146 283.4);
Tailwind
colors: {
  custom: {
    50: '#6e569c',
    500: '#2a1572',
    950: '#000000',
  },
}
SCSS
$custom: #2a1572;
$custom-light: #6e569c;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1572",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 114
  },
  "hsl": {
    "h": 253.548,
    "s": 68.889,
    "l": 26.471
  },
  "oklch": {
    "l": 0.29844,
    "c": 0.14644,
    "h": 283.4
  },
  "luminance": 0.02243
}

Semantic roles & 50–950 ramp

primary
#2A1572
secondary
#8FA83B
accent
#EC3CC4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1572

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

Preview Lab → · Contrast checker → · Palette generator →

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