#2A1562#2A1562

#2A1562 is a dark, vivid violet. Relative luminance 0.019; OKLCH L 28.1% C 0.126 H 287.9°. Best body text is #FFFFFF at 15.20:1 contrast (WCAG AA passes).

Color values

HEX#2A1562
RGBrgb(42, 21, 98)
HSLhsl(256, 65%, 23%)
HSVhsv(256, 79%, 38%)
CMYKcmyk(57.1%, 78.6%, 0%, 61.6%)
CIE-LABlab(15.01, 31.52, -41.73)
CIE-LCHlch(15.01, 52.30, 307.07°)
OKLaboklab(28.13% 0.0387 -0.12)
OKLCHoklch(28.13% 0.126 287.9)
XYZxyz(3.4270, 1.9102, 11.7410)
Luminance0.0191 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1562 #4D6215
analogous
#152662 #2A1562 #501562
triadic
#2A1562 #622A15 #15622A
tetradic
#2A1562 #621526 #4D6215 #156250
square
#2A1562 #621526 #4D6215 #156250
split-complementary
#2A1562 #625015 #266215
monochromatic
#0B0519 #140A30 #2A1562 #402094 #552BC7

Accessibility & contrast

On white

15.20
#2A1562 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#2A1562 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1562
15.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1562#FFFFFF#000000##FFFFFF
##2A15621.0015.201.3815.20
#FFFFFF15.201.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002764
Deuteranopia (green-blind)
#002461
Tritanopia (blue-blind)
#132A3A
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #2a1562;
/* rgb */ color: rgb(42, 21, 98);
/* oklch */ color: oklch(28.1% 0.126 287.9);
Tailwind
colors: {
  custom: {
    50: '#6b558f',
    500: '#2a1562',
    950: '#000000',
  },
}
SCSS
$custom: #2a1562;
$custom-light: #6b558f;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1562",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 98
  },
  "hsl": {
    "h": 256.364,
    "s": 64.706,
    "l": 23.333
  },
  "oklch": {
    "l": 0.28133,
    "c": 0.12608,
    "h": 287.9
  },
  "luminance": 0.0191
}

Semantic roles & 50–950 ramp

primary
#2A1562
secondary
#7F993A
accent
#E840BA
background
#F6F5F8
surface
#ECE9F0
border
#C7C5CB
text
#07030C
muted
#7A787D

Preview Lab

Preview with #2A1562

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

Preview Lab → · Contrast checker → · Palette generator →

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