#2A1786#2A1786

#2A1786 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.3% C 0.169 H 279.0°. Best body text is #FFFFFF at 13.42:1 contrast (WCAG AA passes).

Color values

HEX#2A1786
RGBrgb(42, 23, 134)
HSLhsl(250, 71%, 31%)
HSVhsv(250, 83%, 53%)
CMYKcmyk(68.7%, 82.8%, 0%, 47.5%)
CIE-LABlab(19.33, 41.83, -57.85)
CIE-LCHlch(19.33, 71.39, 305.87°)
OKLaboklab(32.34% 0.0264 -0.1671)
OKLCHoklch(32.34% 0.169 279)
XYZxyz(5.5629, 2.8258, 22.8019)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1786 #738617
analogous
#173B86 #2A1786 #611786
triadic
#2A1786 #862A17 #17862A
tetradic
#2A1786 #86173B #738617 #178661
square
#2A1786 #86173B #738617 #178661
split-complementary
#2A1786 #866117 #3B8617
monochromatic
#09051E #1A0E52 #2A1786 #3A20BA #563ADD

Accessibility & contrast

On white

13.42
#2A1786 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#2A1786 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1786
13.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1786#FFFFFF#000000##FFFFFF
##2A17861.0013.421.5713.42
#FFFFFF13.421.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003389
Deuteranopia (green-blind)
#002A84
Tritanopia (blue-blind)
#00394F
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #2a1786;
/* rgb */ color: rgb(42, 23, 134);
/* oklch */ color: oklch(32.3% 0.169 279.0);
Tailwind
colors: {
  custom: {
    50: '#7258aa',
    500: '#2a1786',
    950: '#000000',
  },
}
SCSS
$custom: #2a1786;
$custom-light: #7258aa;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1786",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 134
  },
  "hsl": {
    "h": 250.27,
    "s": 70.701,
    "l": 30.784
  },
  "oklch": {
    "l": 0.32336,
    "c": 0.16915,
    "h": 279
  },
  "luminance": 0.02826
}

Semantic roles & 50–950 ramp

primary
#2A1786
secondary
#A5BA3F
accent
#ED3ACF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2A1786

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

Preview Lab → · Contrast checker → · Palette generator →

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