#2A1276#2A1276

#2A1276 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.9% C 0.154 H 282.9°. Best body text is #FFFFFF at 14.52:1 contrast (WCAG AA passes).

Color values

HEX#2A1276
RGBrgb(42, 18, 118)
HSLhsl(254, 74%, 27%)
HSVhsv(254, 85%, 46%)
CMYKcmyk(64.4%, 84.7%, 0%, 53.7%)
CIE-LABlab(16.66, 39.29, -52.08)
CIE-LCHlch(16.66, 65.23, 307.03°)
OKLaboklab(29.94% 0.0344 -0.1502)
OKLCHoklch(29.94% 0.154 282.9)
XYZxyz(4.4401, 2.2325, 17.3330)
Luminance0.0223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1276 #5E7612
analogous
#122C76 #2A1276 #5C1276
triadic
#2A1276 #762A12 #12762A
tetradic
#2A1276 #76122C #5E7612 #12765C
square
#2A1276 #76122C #5E7612 #12765C
split-complementary
#2A1276 #765C12 #2C7612
monochromatic
#09041B #170A41 #2A1276 #3D1AAB #5125DE

Accessibility & contrast

On white

14.52
#2A1276 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#2A1276 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1276
14.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1276#FFFFFF#000000##FFFFFF
##2A12761.0014.521.4514.52
#FFFFFF14.521.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C79
Deuteranopia (green-blind)
#002674
Tritanopia (blue-blind)
#003145
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #2a1276;
/* rgb */ color: rgb(42, 18, 118);
/* oklch */ color: oklch(29.9% 0.154 282.9);
Tailwind
colors: {
  custom: {
    50: '#6f549f',
    500: '#2a1276',
    950: '#000000',
  },
}
SCSS
$custom: #2a1276;
$custom-light: #6f549f;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1276",
  "rgb": {
    "r": 42,
    "g": 18,
    "b": 118
  },
  "hsl": {
    "h": 254.4,
    "s": 73.529,
    "l": 26.667
  },
  "oklch": {
    "l": 0.29943,
    "c": 0.15409,
    "h": 282.9
  },
  "luminance": 0.02233
}

Semantic roles & 50–950 ramp

primary
#2A1276
secondary
#90AD37
accent
#F038C4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030F
muted
#7B787E

Preview Lab

Preview with #2A1276

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

Preview Lab → · Contrast checker → · Palette generator →

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