#2C1771#2C1771

#2C1771 is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.143 H 284.6°. Best body text is #FFFFFF at 14.30:1 contrast (WCAG AA passes).

Color values

HEX#2C1771
RGBrgb(44, 23, 113)
HSLhsl(254, 66%, 27%)
HSVhsv(254, 80%, 44%)
CMYKcmyk(61.1%, 79.6%, 0%, 55.7%)
CIE-LABlab(17.18, 35.49, -47.99)
CIE-LCHlch(17.18, 59.68, 306.48°)
OKLaboklab(30.19% 0.0361 -0.1383)
OKLCHoklch(30.19% 0.143 284.6)
XYZxyz(4.3248, 2.3402, 15.8434)
Luminance0.0234 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C1771 #5C7117
analogous
#172F71 #2C1771 #591771
triadic
#2C1771 #712C17 #17712C
tetradic
#2C1771 #71172F #5C7117 #177159
square
#2C1771 #71172F #5C7117 #177159
split-complementary
#2C1771 #715917 #2F7117
monochromatic
#0A0519 #180D3E #2C1771 #4021A4 #552ED4

Accessibility & contrast

On white

14.30
#2C1771 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#2C1771 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C1771
14.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C1771#FFFFFF#000000##FFFFFF
##2C17711.0014.301.4714.30
#FFFFFF14.301.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002D74
Deuteranopia (green-blind)
#00276F
Tritanopia (blue-blind)
#053143
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #2c1771;
/* rgb */ color: rgb(44, 23, 113);
/* oklch */ color: oklch(30.2% 0.143 284.6);
Tailwind
colors: {
  custom: {
    50: '#6f579b',
    500: '#2c1771',
    950: '#000000',
  },
}
SCSS
$custom: #2c1771;
$custom-light: #6f579b;
$custom-dark: #000000;
JSON
{
  "hex": "#2c1771",
  "rgb": {
    "r": 44,
    "g": 23,
    "b": 113
  },
  "hsl": {
    "h": 254,
    "s": 66.176,
    "l": 26.667
  },
  "oklch": {
    "l": 0.30187,
    "c": 0.14288,
    "h": 284.6
  },
  "luminance": 0.02341
}

Semantic roles & 50–950 ramp

primary
#2C1771
secondary
#8EA73D
accent
#E93FC1
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2C1771

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

Preview Lab → · Contrast checker → · Palette generator →

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