#2A157D#2A157D

#2A157D is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.1% C 0.160 H 280.9°. Best body text is #FFFFFF at 13.98:1 contrast (WCAG AA passes).

Color values

HEX#2A157D
RGBrgb(42, 21, 125)
HSLhsl(252, 71%, 29%)
HSVhsv(252, 83%, 49%)
CMYKcmyk(66.4%, 83.2%, 0%, 51%)
CIE-LABlab(17.96, 40.01, -54.42)
CIE-LCHlch(17.96, 67.55, 306.32°)
OKLaboklab(31.08% 0.0304 -0.1571)
OKLCHoklch(31.08% 0.16 280.9)
XYZxyz(4.9235, 2.5089, 19.6229)
Luminance0.0251 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157D #687D15
analogous
#15347D #2A157D #5E157D
triadic
#2A157D #7D2A15 #157D2A
tetradic
#2A157D #7D1534 #687D15 #157D5E
square
#2A157D #7D1534 #687D15 #157D5E
split-complementary
#2A157D #7D5E15 #347D15
monochromatic
#09041A #180C49 #2A157D #3C1EB1 #5330DC

Accessibility & contrast

On white

13.98
#2A157D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A157D
13.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157D#FFFFFF#000000##FFFFFF
##2A157D1.0013.981.5013.98
#FFFFFF13.981.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF13.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F80
Deuteranopia (green-blind)
#00287B
Tritanopia (blue-blind)
#00354A
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2a157d;
/* rgb */ color: rgb(42, 21, 125);
/* oklch */ color: oklch(31.1% 0.160 280.9);
Tailwind
colors: {
  custom: {
    50: '#7056a4',
    500: '#2a157d',
    950: '#000000',
  },
}
SCSS
$custom: #2a157d;
$custom-light: #7056a4;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157d",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 125
  },
  "hsl": {
    "h": 252.115,
    "s": 71.233,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31078,
    "c": 0.15997,
    "h": 280.9
  },
  "luminance": 0.02509
}

Semantic roles & 50–950 ramp

primary
#2A157D
secondary
#9AB23C
accent
#EE3ACA
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A157D

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

Preview Lab → · Contrast checker → · Palette generator →

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