#2A1878#2A1878

#2A1878 is a dark, vivid violet. Relative luminance 0.025; OKLCH L 30.9% C 0.151 H 281.5°. Best body text is #FFFFFF at 14.00:1 contrast (WCAG AA passes).

Color values

HEX#2A1878
RGBrgb(42, 24, 120)
HSLhsl(251, 67%, 28%)
HSVhsv(251, 80%, 47%)
CMYKcmyk(65%, 80%, 0%, 52.9%)
CIE-LABlab(17.92, 36.91, -51.28)
CIE-LCHlch(17.92, 63.19, 305.75°)
OKLaboklab(30.89% 0.0301 -0.1479)
OKLCHoklch(30.89% 0.151 281.5)
XYZxyz(4.6706, 2.5012, 18.0023)
Luminance0.0250 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1878 #667818
analogous
#183678 #2A1878 #5A1878
triadic
#2A1878 #782A18 #18782A
tetradic
#2A1878 #781836 #667818 #18785A
square
#2A1878 #781836 #667818 #18785A
split-complementary
#2A1878 #785A18 #367818
monochromatic
#09051A #180E45 #2A1878 #3C22AB #5234D6

Accessibility & contrast

On white

14.00
#2A1878 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2A1878 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1878
14.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1878#FFFFFF#000000##FFFFFF
##2A18781.0014.001.5014.00
#FFFFFF14.001.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7B
Deuteranopia (green-blind)
#002876
Tritanopia (blue-blind)
#003447
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2a1878;
/* rgb */ color: rgb(42, 24, 120);
/* oklch */ color: oklch(30.9% 0.151 281.5);
Tailwind
colors: {
  custom: {
    50: '#6f58a0',
    500: '#2a1878',
    950: '#000000',
  },
}
SCSS
$custom: #2a1878;
$custom-light: #6f58a0;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1878",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 120
  },
  "hsl": {
    "h": 251.25,
    "s": 66.667,
    "l": 28.235
  },
  "oklch": {
    "l": 0.30886,
    "c": 0.15098,
    "h": 281.5
  },
  "luminance": 0.02502
}

Semantic roles & 50–950 ramp

primary
#2A1878
secondary
#98AD3F
accent
#EA3EC9
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2A1878

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

Preview Lab → · Contrast checker → · Palette generator →

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