#2C178F#2C178F

#2C178F is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.179 H 278.5°. Best body text is #FFFFFF at 12.91:1 contrast (WCAG AA passes).

Color values

HEX#2C178F
RGBrgb(44, 23, 143)
HSLhsl(251, 72%, 33%)
HSVhsv(251, 84%, 56%)
CMYKcmyk(69.2%, 83.9%, 0%, 43.9%)
CIE-LABlab(20.56, 44.78, -61.45)
CIE-LCHlch(20.56, 76.03, 306.08°)
OKLaboklab(33.54% 0.0266 -0.1775)
OKLCHoklch(33.54% 0.179 278.5)
XYZxyz(6.3014, 3.1309, 26.2535)
Luminance0.0313 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C178F #7A8F17
analogous
#173E8F #2C178F #68178F
triadic
#2C178F #8F2C17 #178F2C
tetradic
#2C178F #8F173E #7A8F17 #178F68
square
#2C178F #8F173E #7A8F17 #178F68
split-complementary
#2C178F #8F6817 #3E8F17
monochromatic
#0C0626 #1C0F5A #2C178F #3C1FC4 #5C40E0

Accessibility & contrast

On white

12.91
#2C178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#2C178F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C178F
12.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C178F#FFFFFF#000000##FFFFFF
##2C178F1.0012.911.6312.91
#FFFFFF12.911.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003692
Deuteranopia (green-blind)
#002D8D
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #2c178f;
/* rgb */ color: rgb(44, 23, 143);
/* oklch */ color: oklch(33.5% 0.179 278.5);
Tailwind
colors: {
  custom: {
    50: '#7559b1',
    500: '#2c178f',
    950: '#000000',
  },
}
SCSS
$custom: #2c178f;
$custom-light: #7559b1;
$custom-dark: #000000;
JSON
{
  "hex": "#2c178f",
  "rgb": {
    "r": 44,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 250.5,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33537,
    "c": 0.17945,
    "h": 278.5
  },
  "luminance": 0.03131
}

Semantic roles & 50–950 ramp

primary
#2C178F
secondary
#AAC141
accent
#EF39CF
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #2C178F

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

Preview Lab → · Contrast checker → · Palette generator →

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