#2A1242#2A1242

#2A1242 is a very dark, moderate violet. Relative luminance 0.013; OKLCH L 24.6% C 0.088 H 303.6°. Best body text is #FFFFFF at 16.62:1 contrast (WCAG AA passes).

Color values

HEX#2A1242
RGBrgb(42, 18, 66)
HSLhsl(270, 57%, 16%)
HSVhsv(270, 73%, 26%)
CMYKcmyk(36.4%, 72.7%, 0%, 74.1%)
CIE-LABlab(11.40, 23.39, -25.75)
CIE-LCHlch(11.40, 34.79, 312.25°)
OKLaboklab(24.64% 0.0485 -0.0731)
OKLCHoklch(24.64% 0.088 303.6)
XYZxyz(2.1543, 1.3182, 5.2941)
Luminance0.0132 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1242 #2A4212
analogous
#121242 #2A1242 #421242
triadic
#2A1242 #422A12 #12422A
tetradic
#2A1242 #421212 #2A4212 #124242
square
#2A1242 #421212 #2A4212 #124242
split-complementary
#2A1242 #424212 #124212
monochromatic
#0F0718 #0F0718 #2A1242 #491F72 #672CA2

Accessibility & contrast

On white

16.62
#2A1242 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.26
#2A1242 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1242
16.62:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1242#FFFFFF#000000##FFFFFF
##2A12421.0016.621.2616.62
#FFFFFF16.621.0021.001.00
#0000001.2621.001.0021.00
##FFFFFF16.621.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001E43
Deuteranopia (green-blind)
#041E41
Tritanopia (blue-blind)
#251C28
Achromatopsia (no color)
#1E1E1E

Design tokens & code

CSS
--color: #2a1242;
/* rgb */ color: rgb(42, 18, 66);
/* oklch */ color: oklch(24.6% 0.088 303.6);
Tailwind
colors: {
  custom: {
    50: '#665177',
    500: '#2a1242',
    950: '#000000',
  },
}
SCSS
$custom: #2a1242;
$custom-light: #665177;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1242",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 66
  },
  "hsl": {
    "h": 270,
    "s": 57.143,
    "l": 16.471
  },
  "oklch": {
    "l": 0.24638,
    "c": 0.08767,
    "h": 303.6
  },
  "luminance": 0.01318
}

Semantic roles & 50–950 ramp

primary
#2A1242
secondary
#587B35
accent
#E04794
background
#F6F4F7
surface
#EBE7ED
border
#C6C3C8
text
#060208
muted
#7A787B

Preview Lab

Preview with #2A1242

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

Preview Lab → · Contrast checker → · Palette generator →

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