#2A1772#2A1772

#2A1772 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.144 H 283.0°. Best body text is #FFFFFF at 14.34:1 contrast (WCAG AA passes).

Color values

HEX#2A1772
RGBrgb(42, 23, 114)
HSLhsl(253, 66%, 27%)
HSVhsv(253, 80%, 45%)
CMYKcmyk(63.2%, 79.8%, 0%, 55.3%)
CIE-LABlab(17.08, 35.53, -48.80)
CIE-LCHlch(17.08, 60.37, 306.06°)
OKLaboklab(30.1% 0.0325 -0.1407)
OKLCHoklch(30.1% 0.144 283)
XYZxyz(4.2976, 2.3196, 16.1376)
Luminance0.0232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A1772 #5F7217
analogous
#173272 #2A1772 #581772
triadic
#2A1772 #722A17 #17722A
tetradic
#2A1772 #721732 #5F7217 #177258
square
#2A1772 #721732 #5F7217 #177258
split-complementary
#2A1772 #725817 #327217
monochromatic
#090519 #170D3F #2A1772 #3D21A5 #512ED5

Accessibility & contrast

On white

14.34
#2A1772 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#2A1772 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A1772
14.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A1772#FFFFFF#000000##FFFFFF
##2A17721.0014.341.4614.34
#FFFFFF14.341.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.341.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a1772;
/* rgb */ color: rgb(42, 23, 114);
/* oklch */ color: oklch(30.1% 0.144 283.0);
Tailwind
colors: {
  custom: {
    50: '#6e579c',
    500: '#2a1772',
    950: '#000000',
  },
}
SCSS
$custom: #2a1772;
$custom-light: #6e579c;
$custom-dark: #000000;
JSON
{
  "hex": "#2a1772",
  "rgb": {
    "r": 42,
    "g": 23,
    "b": 114
  },
  "hsl": {
    "h": 252.527,
    "s": 66.423,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30101,
    "c": 0.14441,
    "h": 283
  },
  "luminance": 0.0232
}

Semantic roles & 50–950 ramp

primary
#2A1772
secondary
#91A83D
accent
#E93EC6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2A1772

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

Preview Lab → · Contrast checker → · Palette generator →

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