#2C157B#2C157B

#2C157B is a dark, vivid violet. Relative luminance 0.025; OKLCH L 31.0% C 0.157 H 282.6°. Best body text is #FFFFFF at 14.00:1 contrast (WCAG AA passes).

Color values

HEX#2C157B
RGBrgb(44, 21, 123)
HSLhsl(254, 71%, 28%)
HSVhsv(254, 83%, 48%)
CMYKcmyk(64.2%, 82.9%, 0%, 51.8%)
CIE-LABlab(17.93, 39.62, -53.19)
CIE-LCHlch(17.93, 66.33, 306.68°)
OKLaboklab(31.04% 0.0342 -0.1534)
OKLCHoklch(31.04% 0.157 282.6)
XYZxyz(4.8809, 2.5015, 18.9607)
Luminance0.0250 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C157B #647B15
analogous
#15317B #2C157B #5F157B
triadic
#2C157B #7B2C15 #157B2C
tetradic
#2C157B #7B1531 #647B15 #157B5F
square
#2C157B #7B1531 #647B15 #157B5F
split-complementary
#2C157B #7B5F15 #317B15
monochromatic
#09041A #190C47 #2C157B #3F1EAF #562FDB

Accessibility & contrast

On white

14.00
#2C157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.50
#2C157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C157B
14.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C157B#FFFFFF#000000##FFFFFF
##2C157B1.0014.001.5014.00
#FFFFFF14.001.0021.001.00
#0000001.5021.001.0021.00
##FFFFFF14.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7E
Deuteranopia (green-blind)
#002879
Tritanopia (blue-blind)
#003448
Achromatopsia (no color)
#2C2C2C

Design tokens & code

CSS
--color: #2c157b;
/* rgb */ color: rgb(44, 21, 123);
/* oklch */ color: oklch(31.0% 0.157 282.6);
Tailwind
colors: {
  custom: {
    50: '#7157a2',
    500: '#2c157b',
    950: '#000000',
  },
}
SCSS
$custom: #2c157b;
$custom-light: #7157a2;
$custom-dark: #000000;
JSON
{
  "hex": "#2c157b",
  "rgb": {
    "r": 44,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 253.529,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31035,
    "c": 0.15719,
    "h": 282.6
  },
  "luminance": 0.02502
}

Semantic roles & 50–950 ramp

primary
#2C157B
secondary
#96B03B
accent
#EE3AC5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #2C157B

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

Preview Lab → · Contrast checker → · Palette generator →

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