#2A157A#2A157A

#2A157A is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.7% C 0.156 H 281.6°. Best body text is #FFFFFF at 14.12:1 contrast (WCAG AA passes).

Color values

HEX#2A157A
RGBrgb(42, 21, 122)
HSLhsl(252, 71%, 28%)
HSVhsv(252, 83%, 48%)
CMYKcmyk(65.6%, 82.8%, 0%, 52.2%)
CIE-LABlab(17.61, 39.08, -53.07)
CIE-LCHlch(17.61, 65.91, 306.37°)
OKLaboklab(30.74% 0.0314 -0.1531)
OKLCHoklch(30.74% 0.156 281.6)
XYZxyz(4.7348, 2.4334, 18.6288)
Luminance0.0243 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157A #657A15
analogous
#15337A #2A157A #5C157A
triadic
#2A157A #7A2A15 #157A2A
tetradic
#2A157A #7A1533 #657A15 #157A5C
square
#2A157A #7A1533 #657A15 #157A5C
split-complementary
#2A157A #7A5C15 #337A15
monochromatic
#09041A #180C46 #2A157A #3C1EAE #522EDB

Accessibility & contrast

On white

14.12
#2A157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.49
#2A157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A157A
14.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157A#FFFFFF#000000##FFFFFF
##2A157A1.0014.121.4914.12
#FFFFFF14.121.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002E7D
Deuteranopia (green-blind)
#002878
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2B2B2B

Design tokens & code

CSS
--color: #2a157a;
/* rgb */ color: rgb(42, 21, 122);
/* oklch */ color: oklch(30.7% 0.156 281.6);
Tailwind
colors: {
  custom: {
    50: '#7056a2',
    500: '#2a157a',
    950: '#000000',
  },
}
SCSS
$custom: #2a157a;
$custom-light: #7056a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157a",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 252.475,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.30737,
    "c": 0.15631,
    "h": 281.6
  },
  "luminance": 0.02434
}

Semantic roles & 50–950 ramp

primary
#2A157A
secondary
#97AF3B
accent
#ED3AC8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2A157A

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

Preview Lab → · Contrast checker → · Palette generator →

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