#2A157B#2A157B

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

Color values

HEX#2A157B
RGBrgb(42, 21, 123)
HSLhsl(252, 71%, 28%)
HSVhsv(252, 83%, 48%)
CMYKcmyk(65.9%, 82.9%, 0%, 51.8%)
CIE-LABlab(17.73, 39.39, -53.52)
CIE-LCHlch(17.73, 66.46, 306.35°)
OKLaboklab(30.85% 0.031 -0.1544)
OKLCHoklch(30.85% 0.158 281.4)
XYZxyz(4.7970, 2.4583, 18.9568)
Luminance0.0246 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157B #667B15
analogous
#15337B #2A157B #5D157B
triadic
#2A157B #7B2A15 #157B2A
tetradic
#2A157B #7B1533 #667B15 #157B5D
square
#2A157B #7B1533 #667B15 #157B5D
split-complementary
#2A157B #7B5D15 #337B15
monochromatic
#09041A #180C47 #2A157B #3C1EAF #522FDB

Accessibility & contrast

On white

14.08
#2A157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A157B
14.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157B#FFFFFF#000000##FFFFFF
##2A157B1.0014.081.4914.08
#FFFFFF14.081.0021.001.00
#0000001.4921.001.0021.00
##FFFFFF14.081.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2a157b;
/* rgb */ color: rgb(42, 21, 123);
/* oklch */ color: oklch(30.9% 0.158 281.4);
Tailwind
colors: {
  custom: {
    50: '#7056a2',
    500: '#2a157b',
    950: '#000000',
  },
}
SCSS
$custom: #2a157b;
$custom-light: #7056a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157b",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 252.353,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.3085,
    "c": 0.15754,
    "h": 281.4
  },
  "luminance": 0.02459
}

Semantic roles & 50–950 ramp

primary
#2A157B
secondary
#98B03B
accent
#EE3AC9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#08030F
muted
#7B787F

Preview Lab

Preview with #2A157B

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

Preview Lab → · Contrast checker → · Palette generator →

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