#2C157F#2C157F

#2C157F is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.162 H 281.7°. Best body text is #FFFFFF at 13.81:1 contrast (WCAG AA passes).

Color values

HEX#2C157F
RGBrgb(44, 21, 127)
HSLhsl(253, 72%, 29%)
HSVhsv(253, 83%, 50%)
CMYKcmyk(65.4%, 83.5%, 0%, 50.2%)
CIE-LABlab(18.38, 40.84, -54.99)
CIE-LCHlch(18.38, 68.50, 306.60°)
OKLaboklab(31.49% 0.0329 -0.1587)
OKLCHoklch(31.49% 0.162 281.7)
XYZxyz(5.1364, 2.6037, 20.3065)
Luminance0.0260 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C157F #687F15
analogous
#15337F #2C157F #61157F
triadic
#2C157F #7F2C15 #157F2C
tetradic
#2C157F #7F1533 #687F15 #157F61
square
#2C157F #7F1533 #687F15 #157F61
split-complementary
#2C157F #7F6115 #337F15
monochromatic
#09041A #1A0C4A #2C157F #3E1EB4 #5731DD

Accessibility & contrast

On white

13.81
#2C157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#2C157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C157F
13.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C157F#FFFFFF#000000##FFFFFF
##2C157F1.0013.811.5213.81
#FFFFFF13.811.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003082
Deuteranopia (green-blind)
#00297D
Tritanopia (blue-blind)
#00364B
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2c157f;
/* rgb */ color: rgb(44, 21, 127);
/* oklch */ color: oklch(31.5% 0.162 281.7);
Tailwind
colors: {
  custom: {
    50: '#7257a5',
    500: '#2c157f',
    950: '#000000',
  },
}
SCSS
$custom: #2c157f;
$custom-light: #7257a5;
$custom-dark: #000000;
JSON
{
  "hex": "#2c157f",
  "rgb": {
    "r": 44,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 253.019,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.31485,
    "c": 0.16204,
    "h": 281.7
  },
  "luminance": 0.02604
}

Semantic roles & 50–950 ramp

primary
#2C157F
secondary
#9AB43C
accent
#EE39C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2C157F

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

Preview Lab → · Contrast checker → · Palette generator →

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