#2A158F#2A158F

#2A158F is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.2% C 0.181 H 277.7°. Best body text is #FFFFFF at 13.11:1 contrast (WCAG AA passes).

Color values

HEX#2A158F
RGBrgb(42, 21, 143)
HSLhsl(250, 74%, 32%)
HSVhsv(250, 85%, 56%)
CMYKcmyk(70.6%, 85.3%, 0%, 43.9%)
CIE-LABlab(20.09, 45.50, -62.23)
CIE-LCHlch(20.09, 77.09, 306.17°)
OKLaboklab(33.17% 0.0244 -0.1798)
OKLCHoklch(33.17% 0.181 277.7)
XYZxyz(6.1793, 3.0112, 26.2368)
Luminance0.0301 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A158F #7A8F15
analogous
#153D8F #2A158F #67158F
triadic
#2A158F #8F2A15 #158F2A
tetradic
#2A158F #8F153D #7A8F15 #158F67
square
#2A158F #8F153D #7A8F15 #158F67
split-complementary
#2A158F #8F6715 #3D8F15
monochromatic
#0B0524 #1A0D5A #2A158F #3A1DC4 #593CE2

Accessibility & contrast

On white

13.11
#2A158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#2A158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A158F
13.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A158F#FFFFFF#000000##FFFFFF
##2A158F1.0013.111.6013.11
#FFFFFF13.111.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003592
Deuteranopia (green-blind)
#002B8D
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2a158f;
/* rgb */ color: rgb(42, 21, 143);
/* oklch */ color: oklch(33.2% 0.181 277.7);
Tailwind
colors: {
  custom: {
    50: '#7458b1',
    500: '#2a158f',
    950: '#000000',
  },
}
SCSS
$custom: #2a158f;
$custom-light: #7458b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2a158f",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 250.328,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33169,
    "c": 0.18142,
    "h": 277.7
  },
  "luminance": 0.03012
}

Semantic roles & 50–950 ramp

primary
#2A158F
secondary
#ABC23E
accent
#F137D1
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0311
muted
#7C7880

Preview Lab

Preview with #2A158F

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

Preview Lab → · Contrast checker → · Palette generator →

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