#2A1257#2A1257

#2A1257 is a dark, moderate violet. Relative luminance 0.016; OKLCH L 26.6% C 0.115 H 292.6°. Best body text is #FFFFFF at 15.88:1 contrast (WCAG AA passes).

Color values

HEX#2A1257
RGBrgb(42, 18, 87)
HSLhsl(261, 66%, 21%)
HSVhsv(261, 79%, 34%)
CMYKcmyk(51.7%, 79.3%, 0%, 65.9%)
CIE-LABlab(13.31, 29.75, -37.15)
CIE-LCHlch(13.31, 47.59, 308.69°)
OKLaboklab(26.59% 0.0445 -0.1065)
OKLCHoklch(26.59% 0.115 292.6)
XYZxyz(2.8910, 1.6129, 9.1740)
Luminance0.0161 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1257 #3F5712
analogous
#121C57 #2A1257 #4C1257
triadic
#2A1257 #572A12 #12572A
tetradic
#2A1257 #57121C #3F5712 #12574C
square
#2A1257 #57121C #3F5712 #12574C
split-complementary
#2A1257 #574C12 #1C5712
monochromatic
#0C0519 #120824 #2A1257 #421C8A #5B27BC

Accessibility & contrast

On white

15.88
#2A1257 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.32
#2A1257 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1257
15.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1257#FFFFFF#000000##FFFFFF
##2A12571.0015.881.3215.88
#FFFFFF15.881.0021.001.00
#0000001.3221.001.0021.00
##FFFFFF15.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002359
Deuteranopia (green-blind)
#002156
Tritanopia (blue-blind)
#1C2433
Achromatopsia (no color)
#222222

Design tokens & code

CSS
--color: #2a1257;
/* rgb */ color: rgb(42, 18, 87);
/* oklch */ color: oklch(26.6% 0.115 292.6);
Tailwind
colors: {
  custom: {
    50: '#695287',
    500: '#2a1257',
    950: '#000000',
  },
}
SCSS
$custom: #2a1257;
$custom-light: #695287;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1257",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 87
  },
  "hsl": {
    "h": 260.87,
    "s": 65.714,
    "l": 20.588
  },
  "oklch": {
    "l": 0.26594,
    "c": 0.11545,
    "h": 292.6
  },
  "luminance": 0.01613
}

Semantic roles & 50–950 ramp

primary
#2A1257
secondary
#709035
accent
#E93FAE
background
#F6F4F8
surface
#EBE7EF
border
#C6C3CA
text
#07020B
muted
#7A787C

Preview Lab

Preview with #2A1257

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

Preview Lab → · Contrast checker → · Palette generator →

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