#2A157C#2A157C

#2A157C is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.159 H 281.1°. Best body text is #FFFFFF at 14.03:1 contrast (WCAG AA passes).

Color values

HEX#2A157C
RGBrgb(42, 21, 124)
HSLhsl(252, 71%, 28%)
HSVhsv(252, 83%, 49%)
CMYKcmyk(66.1%, 83.1%, 0%, 51.4%)
CIE-LABlab(17.84, 39.71, -53.97)
CIE-LCHlch(17.84, 67.00, 306.34°)
OKLaboklab(30.96% 0.0307 -0.1558)
OKLCHoklch(30.96% 0.159 281.1)
XYZxyz(4.8600, 2.4834, 19.2881)
Luminance0.0248 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A157C #677C15
analogous
#15337C #2A157C #5D157C
triadic
#2A157C #7C2A15 #157C2A
tetradic
#2A157C #7C1533 #677C15 #157C5D
square
#2A157C #7C1533 #677C15 #157C5D
split-complementary
#2A157C #7C5D15 #337C15
monochromatic
#09041A #180C48 #2A157C #3C1EB0 #5330DC

Accessibility & contrast

On white

14.03
#2A157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2A157C
14.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A157C#FFFFFF#000000##FFFFFF
##2A157C1.0014.031.5014.03
#FFFFFF14.031.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7F
Deuteranopia (green-blind)
#00287A
Tritanopia (blue-blind)
#003449
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2a157c;
/* rgb */ color: rgb(42, 21, 124);
/* oklch */ color: oklch(31.0% 0.159 281.1);
Tailwind
colors: {
  custom: {
    50: '#7056a3',
    500: '#2a157c',
    950: '#000000',
  },
}
SCSS
$custom: #2a157c;
$custom-light: #7056a3;
$custom-dark: #000000;
JSON
{
  "hex": "#2a157c",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 252.233,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.30964,
    "c": 0.15876,
    "h": 281.1
  },
  "luminance": 0.02484
}

Semantic roles & 50–950 ramp

primary
#2A157C
secondary
#99B13C
accent
#EE3AC9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2A157C

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

Preview Lab → · Contrast checker → · Palette generator →

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