#2A1872#2A1872

#2A1872 is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.2% C 0.143 H 282.8°. Best body text is #FFFFFF at 14.27:1 contrast (WCAG AA passes).

Color values

HEX#2A1872
RGBrgb(42, 24, 114)
HSLhsl(252, 65%, 27%)
HSVhsv(252, 79%, 45%)
CMYKcmyk(63.2%, 78.9%, 0%, 55.3%)
CIE-LABlab(17.27, 34.99, -48.49)
CIE-LCHlch(17.27, 59.79, 305.81°)
OKLaboklab(30.24% 0.0318 -0.1398)
OKLCHoklch(30.24% 0.143 282.8)
XYZxyz(4.3178, 2.3601, 16.1443)
Luminance0.0236 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1872 #607218
analogous
#183372 #2A1872 #571872
triadic
#2A1872 #722A18 #18722A
tetradic
#2A1872 #721833 #607218 #187257
square
#2A1872 #721833 #607218 #187257
split-complementary
#2A1872 #725718 #337218
monochromatic
#090519 #170D3F #2A1872 #3D23A5 #5131D4

Accessibility & contrast

On white

14.27
#2A1872 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#2A1872 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1872
14.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1872#FFFFFF#000000##FFFFFF
##2A18721.0014.271.4714.27
#FFFFFF14.271.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D75
Deuteranopia (green-blind)
#002770
Tritanopia (blue-blind)
#003244
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2a1872;
/* rgb */ color: rgb(42, 24, 114);
/* oklch */ color: oklch(30.2% 0.143 282.8);
Tailwind
colors: {
  custom: {
    50: '#6e579c',
    500: '#2a1872',
    950: '#000000',
  },
}
SCSS
$custom: #2a1872;
$custom-light: #6e579c;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1872",
  "rgb": {
    "r": 42,
    "g": 24,
    "b": 114
  },
  "hsl": {
    "h": 252,
    "s": 65.217,
    "l": 27.059
  },
  "oklch": {
    "l": 0.30235,
    "c": 0.14337,
    "h": 282.8
  },
  "luminance": 0.0236
}

Semantic roles & 50–950 ramp

primary
#2A1872
secondary
#92A73E
accent
#E840C6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1872

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

Preview Lab → · Contrast checker → · Palette generator →

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