#2C158A#2C158A

#2C158A is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.7% C 0.175 H 279.6°. Best body text is #FFFFFF at 13.28:1 contrast (WCAG AA passes).

Color values

HEX#2C158A
RGBrgb(44, 21, 138)
HSLhsl(252, 74%, 31%)
HSVhsv(252, 85%, 54%)
CMYKcmyk(68.1%, 84.8%, 0%, 45.9%)
CIE-LABlab(19.66, 44.17, -59.81)
CIE-LCHlch(19.66, 74.35, 306.45°)
OKLaboklab(32.75% 0.0292 -0.1727)
OKLCHoklch(32.75% 0.175 279.6)
XYZxyz(5.8929, 2.9063, 24.2903)
Luminance0.0291 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C158A #738A15
analogous
#15388A #2C158A #66158A
triadic
#2C158A #8A2C15 #158A2C
tetradic
#2C158A #8A1538 #738A15 #158A66
square
#2C158A #8A1538 #738A15 #158A66
split-complementary
#2C158A #8A6615 #388A15
monochromatic
#0A0520 #1B0D55 #2C158A #3D1DBF #5A39E1

Accessibility & contrast

On white

13.28
#2C158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #2C158A
13.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C158A#FFFFFF#000000##FFFFFF
##2C158A1.0013.281.5813.28
#FFFFFF13.281.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348D
Deuteranopia (green-blind)
#002B88
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #2c158a;
/* rgb */ color: rgb(44, 21, 138);
/* oklch */ color: oklch(32.7% 0.175 279.6);
Tailwind
colors: {
  custom: {
    50: '#7458ad',
    500: '#2c158a',
    950: '#000000',
  },
}
SCSS
$custom: #2c158a;
$custom-light: #7458ad;
$custom-dark: #000000;
JSON
{
  "hex": "#2c158a",
  "rgb": {
    "r": 44,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 251.795,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.32747,
    "c": 0.17511,
    "h": 279.6
  },
  "luminance": 0.02907
}

Semantic roles & 50–950 ramp

primary
#2C158A
secondary
#A5BE3D
accent
#F038CC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2C158A

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

Preview Lab → · Contrast checker → · Palette generator →

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