#2A158C#2A158C

#2A158C is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.8% C 0.178 H 278.2°. Best body text is #FFFFFF at 13.25:1 contrast (WCAG AA passes).

Color values

HEX#2A158C
RGBrgb(42, 21, 140)
HSLhsl(251, 74%, 32%)
HSVhsv(251, 85%, 55%)
CMYKcmyk(70%, 85%, 0%, 45.1%)
CIE-LABlab(19.73, 44.59, -60.96)
CIE-LCHlch(19.73, 75.53, 306.19°)
OKLaboklab(32.82% 0.0254 -0.1761)
OKLCHoklch(32.82% 0.178 278.2)
XYZxyz(5.9551, 2.9215, 25.0559)
Luminance0.0292 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A158C #778C15
analogous
#153C8C #2A158C #66158C
triadic
#2A158C #8C2A15 #158C2A
tetradic
#2A158C #8C153C #778C15 #158C66
square
#2A158C #8C153C #778C15 #158C66
split-complementary
#2A158C #8C6615 #3C8C15
monochromatic
#0A0522 #1A0D57 #2A158C #3A1DC1 #583AE1

Accessibility & contrast

On white

13.25
#2A158C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#2A158C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A158C
13.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A158C#FFFFFF#000000##FFFFFF
##2A158C1.0013.251.5813.25
#FFFFFF13.251.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348F
Deuteranopia (green-blind)
#002B8A
Tritanopia (blue-blind)
#003B52
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2a158c;
/* rgb */ color: rgb(42, 21, 140);
/* oklch */ color: oklch(32.8% 0.178 278.2);
Tailwind
colors: {
  custom: {
    50: '#7458af',
    500: '#2a158c',
    950: '#000000',
  },
}
SCSS
$custom: #2a158c;
$custom-light: #7458af;
$custom-dark: #000000;
JSON
{
  "hex": "#2a158c",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 140
  },
  "hsl": {
    "h": 250.588,
    "s": 73.913,
    "l": 31.569
  },
  "oklch": {
    "l": 0.32815,
    "c": 0.1779,
    "h": 278.2
  },
  "luminance": 0.02922
}

Semantic roles & 50–950 ramp

primary
#2A158C
secondary
#A9C03D
accent
#F137D0
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#090311
muted
#7B7880

Preview Lab

Preview with #2A158C

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

Preview Lab → · Contrast checker → · Palette generator →

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