#2A1789#2A1789

#2A1789 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.7% C 0.173 H 278.5°. Best body text is #FFFFFF at 13.27:1 contrast (WCAG AA passes).

Color values

HEX#2A1789
RGBrgb(42, 23, 137)
HSLhsl(250, 71%, 31%)
HSVhsv(250, 83%, 54%)
CMYKcmyk(69.3%, 83.2%, 0%, 46.3%)
CIE-LABlab(19.68, 42.76, -59.16)
CIE-LCHlch(19.68, 72.99, 305.86°)
OKLaboklab(32.68% 0.0255 -0.1709)
OKLCHoklch(32.68% 0.173 278.5)
XYZxyz(5.7751, 2.9107, 23.9195)
Luminance0.0291 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1789 #768917
analogous
#173D89 #2A1789 #631789
triadic
#2A1789 #892A17 #17892A
tetradic
#2A1789 #89173D #768917 #178963
square
#2A1789 #89173D #768917 #178963
split-complementary
#2A1789 #896317 #3D8917
monochromatic
#0A0520 #1A0E55 #2A1789 #3A20BD #573CDE

Accessibility & contrast

On white

13.27
#2A1789 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#2A1789 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1789
13.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1789#FFFFFF#000000##FFFFFF
##2A17891.0013.271.5813.27
#FFFFFF13.271.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348C
Deuteranopia (green-blind)
#002B87
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2a1789;
/* rgb */ color: rgb(42, 23, 137);
/* oklch */ color: oklch(32.7% 0.173 278.5);
Tailwind
colors: {
  custom: {
    50: '#7358ad',
    500: '#2a1789',
    950: '#000000',
  },
}
SCSS
$custom: #2a1789;
$custom-light: #7358ad;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1789",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 137
  },
  "hsl": {
    "h": 250,
    "s": 71.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.32681,
    "c": 0.17275,
    "h": 278.5
  },
  "luminance": 0.02911
}

Semantic roles & 50–950 ramp

primary
#2A1789
secondary
#A8BD3F
accent
#EE3AD0
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2A1789

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

Preview Lab → · Contrast checker → · Palette generator →

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