#2C1271#2C1271

#2C1271 is a dark, vivid violet. Relative luminance 0.022; OKLCH L 29.6% C 0.148 H 285.5°. Best body text is #FFFFFF at 14.66:1 contrast (WCAG AA passes).

Color values

HEX#2C1271
RGBrgb(44, 18, 113)
HSLhsl(256, 73%, 26%)
HSVhsv(256, 84%, 44%)
CMYKcmyk(61.1%, 84.1%, 0%, 55.7%)
CIE-LABlab(16.31, 38.01, -49.43)
CIE-LCHlch(16.31, 62.35, 307.56°)
OKLaboklab(29.58% 0.0395 -0.1424)
OKLCHoklch(29.58% 0.148 285.5)
XYZxyz(4.2347, 2.1601, 15.8134)
Luminance0.0216 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C1271 #577112
analogous
#122771 #2C1271 #5B1271
triadic
#2C1271 #712C12 #12712C
tetradic
#2C1271 #711227 #577112 #12715B
square
#2C1271 #711227 #577112 #12715B
split-complementary
#2C1271 #715B12 #277112
monochromatic
#0A041A #170A3C #2C1271 #411AA6 #5523DB

Accessibility & contrast

On white

14.66
#2C1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#2C1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C1271
14.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C1271#FFFFFF#000000##FFFFFF
##2C12711.0014.661.4314.66
#FFFFFF14.661.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002B74
Deuteranopia (green-blind)
#00266F
Tritanopia (blue-blind)
#052F42
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #2c1271;
/* rgb */ color: rgb(44, 18, 113);
/* oklch */ color: oklch(29.6% 0.148 285.5);
Tailwind
colors: {
  custom: {
    50: '#6f549b',
    500: '#2c1271',
    950: '#000000',
  },
}
SCSS
$custom: #2c1271;
$custom-light: #6f549b;
$custom-dark: #000000;
JSON
{
  "hex": "#2c1271",
  "rgb": {
    "r": 44,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 256.421,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.29578,
    "c": 0.1478,
    "h": 285.5
  },
  "luminance": 0.0216
}

Semantic roles & 50–950 ramp

primary
#2C1271
secondary
#89A837
accent
#EF39BD
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2C1271

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

Preview Lab → · Contrast checker → · Palette generator →

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