#2A158A#2A158A

#2A158A is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.6% C 0.176 H 278.5°. Best body text is #FFFFFF at 13.35:1 contrast (WCAG AA passes).

Color values

HEX#2A158A
RGBrgb(42, 21, 138)
HSLhsl(251, 74%, 31%)
HSVhsv(251, 85%, 54%)
CMYKcmyk(69.6%, 84.8%, 0%, 45.9%)
CIE-LABlab(19.49, 43.99, -60.11)
CIE-LCHlch(19.49, 74.49, 306.20°)
OKLaboklab(32.58% 0.0261 -0.1736)
OKLCHoklch(32.58% 0.176 278.5)
XYZxyz(5.8090, 2.8630, 24.2863)
Luminance0.0286 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A158A #758A15
analogous
#153A8A #2A158A #64158A
triadic
#2A158A #8A2A15 #158A2A
tetradic
#2A158A #8A153A #758A15 #158A64
square
#2A158A #8A153A #758A15 #158A64
split-complementary
#2A158A #8A6415 #3A8A15
monochromatic
#0A0520 #1A0D55 #2A158A #3A1DBF #5739E1

Accessibility & contrast

On white

13.35
#2A158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#2A158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A158A
13.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A158A#FFFFFF#000000##FFFFFF
##2A158A1.0013.351.5713.35
#FFFFFF13.351.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348D
Deuteranopia (green-blind)
#002A88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #2a158a;
/* rgb */ color: rgb(42, 21, 138);
/* oklch */ color: oklch(32.6% 0.176 278.5);
Tailwind
colors: {
  custom: {
    50: '#7357ad',
    500: '#2a158a',
    950: '#000000',
  },
}
SCSS
$custom: #2a158a;
$custom-light: #7357ad;
$custom-dark: #000000;
JSON
{
  "hex": "#2a158a",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 250.769,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.3258,
    "c": 0.17553,
    "h": 278.5
  },
  "luminance": 0.02864
}

Semantic roles & 50–950 ramp

primary
#2A158A
secondary
#A7BE3D
accent
#F038CF
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2A158A

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

Preview Lab → · Contrast checker → · Palette generator →

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