#2A156C#2A156C

#2A156C is a dark, vivid violet. Relative luminance 0.021; OKLCH L 29.2% C 0.139 H 284.9°. Best body text is #FFFFFF at 14.77:1 contrast (WCAG AA passes).

Color values

HEX#2A156C
RGBrgb(42, 21, 108)
HSLhsl(254, 67%, 25%)
HSVhsv(254, 81%, 42%)
CMYKcmyk(61.1%, 80.6%, 0%, 57.6%)
CIE-LABlab(16.06, 34.70, -46.59)
CIE-LCHlch(16.06, 58.09, 306.68°)
OKLaboklab(29.19% 0.0358 -0.1342)
OKLCHoklch(29.19% 0.139 284.9)
XYZxyz(3.9290, 2.1110, 14.3849)
Luminance0.0211 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2A156C #576C15
analogous
#152B6C #2A156C #55156C
triadic
#2A156C #6C2A15 #156C2A
tetradic
#2A156C #6C152B #576C15 #156C55
square
#2A156C #6C152B #576C15 #156C55
split-complementary
#2A156C #6C5515 #2B6C15
monochromatic
#0A051A #160B39 #2A156C #3E1F9F #5229D2

Accessibility & contrast

On white

14.77
#2A156C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#2A156C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2A156C
14.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2A156C#FFFFFF#000000##FFFFFF
##2A156C1.0014.771.4214.77
#FFFFFF14.771.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002A6E
Deuteranopia (green-blind)
#00256A
Tritanopia (blue-blind)
#062E40
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2a156c;
/* rgb */ color: rgb(42, 21, 108);
/* oklch */ color: oklch(29.2% 0.139 284.9);
Tailwind
colors: {
  custom: {
    50: '#6d5597',
    500: '#2a156c',
    950: '#000000',
  },
}
SCSS
$custom: #2a156c;
$custom-light: #6d5597;
$custom-dark: #000000;
JSON
{
  "hex": "#2a156c",
  "rgb": {
    "r": 42,
    "g": 21,
    "b": 108
  },
  "hsl": {
    "h": 254.483,
    "s": 67.442,
    "l": 25.294
  },
  "oklch": {
    "l": 0.2919,
    "c": 0.1389,
    "h": 284.9
  },
  "luminance": 0.02111
}

Semantic roles & 50–950 ramp

primary
#2A156C
secondary
#89A33A
accent
#EA3DC1
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08030E
muted
#7A787E

Preview Lab

Preview with #2A156C

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

Preview Lab → · Contrast checker → · Palette generator →

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