#2A1172#2A1172

#2A1172 is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.4% C 0.150 H 284.1°. Best body text is #FFFFFF at 14.77:1 contrast (WCAG AA passes).

Color values

HEX#2A1172
RGBrgb(42, 17, 114)
HSLhsl(255, 74%, 26%)
HSVhsv(255, 85%, 45%)
CMYKcmyk(63.2%, 85.1%, 0%, 55.3%)
CIE-LABlab(16.04, 38.53, -50.52)
CIE-LCHlch(16.04, 63.54, 307.34°)
OKLaboklab(29.38% 0.0365 -0.1456)
OKLCHoklch(29.38% 0.15 284.1)
XYZxyz(4.1916, 2.1078, 16.1023)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1172 #597211
analogous
#112872 #2A1172 #5A1172
triadic
#2A1172 #722A11 #11722A
tetradic
#2A1172 #721128 #597211 #11725A
square
#2A1172 #721128 #597211 #11725A
split-complementary
#2A1172 #725A11 #287211
monochromatic
#0A041B #16093D #2A1172 #3E19A7 #5121DD

Accessibility & contrast

On white

14.77
#2A1172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2A1172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1172
14.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1172#FFFFFF#000000##FFFFFF
##2A11721.0014.771.4214.77
#FFFFFF14.771.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B75
Deuteranopia (green-blind)
#002570
Tritanopia (blue-blind)
#002F42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a1172;
/* rgb */ color: rgb(42, 17, 114);
/* oklch */ color: oklch(29.4% 0.150 284.1);
Tailwind
colors: {
  custom: {
    50: '#6e549c',
    500: '#2a1172',
    950: '#000000',
  },
}
SCSS
$custom: #2a1172;
$custom-light: #6e549c;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1172",
  "rgb": {
    "r": 42,
    "g": 17,
    "b": 114
  },
  "hsl": {
    "h": 255.464,
    "s": 74.046,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29378,
    "c": 0.15012,
    "h": 284.1
  },
  "luminance": 0.02108
}

Semantic roles & 50–950 ramp

primary
#2A1172
secondary
#8BA936
accent
#F137C1
background
#F7F5F9
surface
#EDE8F2
border
#C8C4CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1172

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

Preview Lab → · Contrast checker → · Palette generator →

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