#2A1788#2A1788

#2A1788 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.6% C 0.172 H 278.6°. Best body text is #FFFFFF at 13.32:1 contrast (WCAG AA passes).

Color values

HEX#2A1788
RGBrgb(42, 23, 136)
HSLhsl(250, 71%, 31%)
HSVhsv(250, 83%, 53%)
CMYKcmyk(69.1%, 83.1%, 0%, 46.7%)
CIE-LABlab(19.57, 42.45, -58.72)
CIE-LCHlch(19.57, 72.46, 305.87°)
OKLaboklab(32.57% 0.0258 -0.1696)
OKLCHoklch(32.57% 0.172 278.6)
XYZxyz(5.7037, 2.8821, 23.5435)
Luminance0.0288 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1788 #758817
analogous
#173D88 #2A1788 #621788
triadic
#2A1788 #882A17 #17882A
tetradic
#2A1788 #88173D #758817 #178862
square
#2A1788 #88173D #758817 #178862
split-complementary
#2A1788 #886217 #3D8817
monochromatic
#0A051F #1A0E54 #2A1788 #3A20BC #573BDE

Accessibility & contrast

On white

13.32
#2A1788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A1788
13.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1788#FFFFFF#000000##FFFFFF
##2A17881.0013.321.5813.32
#FFFFFF13.321.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348B
Deuteranopia (green-blind)
#002B86
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #2a1788;
/* rgb */ color: rgb(42, 23, 136);
/* oklch */ color: oklch(32.6% 0.172 278.6);
Tailwind
colors: {
  custom: {
    50: '#7358ac',
    500: '#2a1788',
    950: '#000000',
  },
}
SCSS
$custom: #2a1788;
$custom-light: #7358ac;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1788",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 250.088,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.32565,
    "c": 0.17155,
    "h": 278.6
  },
  "luminance": 0.02883
}

Semantic roles & 50–950 ramp

primary
#2A1788
secondary
#A7BC3F
accent
#EE3AD0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #2A1788

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

Preview Lab → · Contrast checker → · Palette generator →

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