#2C1781#2C1781

#2C1781 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.9% C 0.163 H 281.0°. Best body text is #FFFFFF at 13.58:1 contrast (WCAG AA passes).

Color values

HEX#2C1781
RGBrgb(44, 23, 129)
HSLhsl(252, 70%, 30%)
HSVhsv(252, 82%, 51%)
CMYKcmyk(65.9%, 82.2%, 0%, 49.4%)
CIE-LABlab(18.94, 40.49, -55.33)
CIE-LCHlch(18.94, 68.57, 306.20°)
OKLaboklab(31.94% 0.0311 -0.1597)
OKLCHoklch(31.94% 0.163 281)
XYZxyz(5.3063, 2.7328, 21.0125)
Luminance0.0273 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2C1781 #6C8117
analogous
#173781 #2C1781 #611781
triadic
#2C1781 #812C17 #17812C
tetradic
#2C1781 #811737 #6C8117 #178161
square
#2C1781 #811737 #6C8117 #178161
split-complementary
#2C1781 #816117 #378117
monochromatic
#09051A #1A0E4D #2C1781 #3E20B5 #5837DB

Accessibility & contrast

On white

13.58
#2C1781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#2C1781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2C1781
13.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2C1781#FFFFFF#000000##FFFFFF
##2C17811.0013.581.5513.58
#FFFFFF13.581.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003284
Deuteranopia (green-blind)
#002A7F
Tritanopia (blue-blind)
#00374C
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #2c1781;
/* rgb */ color: rgb(44, 23, 129);
/* oklch */ color: oklch(31.9% 0.163 281.0);
Tailwind
colors: {
  custom: {
    50: '#7258a7',
    500: '#2c1781',
    950: '#000000',
  },
}
SCSS
$custom: #2c1781;
$custom-light: #7258a7;
$custom-dark: #000000;
JSON
{
  "hex": "#2c1781",
  "rgb": {
    "r": 44,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 251.887,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.3194,
    "c": 0.1627,
    "h": 281
  },
  "luminance": 0.02733
}

Semantic roles & 50–950 ramp

primary
#2C1781
secondary
#9EB53E
accent
#ED3BC9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #2C1781

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

Preview Lab → · Contrast checker → · Palette generator →

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