#2C1871#2C1871

#2C1871 is a dark, vivid violet. Relative luminance 0.024; OKLCH L 30.3% C 0.142 H 284.4°. Best body text is #FFFFFF at 14.23:1 contrast (WCAG AA passes).

Color values

HEX#2C1871
RGBrgb(44, 24, 113)
HSLhsl(253, 65%, 27%)
HSVhsv(253, 79%, 44%)
CMYKcmyk(61.1%, 78.8%, 0%, 55.7%)
CIE-LABlab(17.37, 34.94, -47.67)
CIE-LCHlch(17.37, 59.11, 306.24°)
OKLaboklab(30.32% 0.0353 -0.1373)
OKLCHoklch(30.32% 0.142 284.4)
XYZxyz(4.3451, 2.3807, 15.8501)
Luminance0.0238 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C1871 #5D7118
analogous
#183171 #2C1871 #591871
triadic
#2C1871 #712C18 #18712C
tetradic
#2C1871 #711831 #5D7118 #187159
square
#2C1871 #711831 #5D7118 #187159
split-complementary
#2C1871 #715918 #317118
monochromatic
#0A0519 #180D3F #2C1871 #4023A3 #5530D3

Accessibility & contrast

On white

14.23
#2C1871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.48
#2C1871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C1871
14.23:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C1871#FFFFFF#000000##FFFFFF
##2C18711.0014.231.4814.23
#FFFFFF14.231.0021.001.00
#0000001.4821.001.0021.00
##FFFFFF14.231.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #2c1871;
/* rgb */ color: rgb(44, 24, 113);
/* oklch */ color: oklch(30.3% 0.142 284.4);
Tailwind
colors: {
  custom: {
    50: '#6f579b',
    500: '#2c1871',
    950: '#000000',
  },
}
SCSS
$custom: #2c1871;
$custom-light: #6f579b;
$custom-dark: #000000;
JSON
{
  "hex": "#2c1871",
  "rgb": {
    "r": 44,
    "g": 24,
    "b": 113
  },
  "hsl": {
    "h": 253.483,
    "s": 64.964,
    "l": 26.863
  },
  "oklch": {
    "l": 0.30321,
    "c": 0.14181,
    "h": 284.4
  },
  "luminance": 0.02381
}

Semantic roles & 50–950 ramp

primary
#2C1871
secondary
#8FA63E
accent
#E840C2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030E
muted
#7B787E

Preview Lab

Preview with #2C1871

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

Preview Lab → · Contrast checker → · Palette generator →

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