#781FA2

A color in the Purple, Crimson, Magenta family

#781fa2 is a color in the Purple, Crimson, Magenta family: RGB(120, 31, 162), HSL(281°, 68%, 38%), CMYK(26%, 81%, 0%, 36%). Closest named color: darkmagenta. Contrast is 8.35:1 on white and 2.52:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#781fa2
RGBrgb(120 31 162)
RGB (legacy)rgb(120, 31, 162)
RGB %rgb(47% 12% 64%)
HSLhsl(281 68% 38%)
HSV / HSBhsv(281, 81%, 64%)
HWBhwb(281 12% 36%)
CMYKcmyk(26%, 81%, 0%, 36%)
CIELAB (D50)lab(32.59 52.63 -52.66)
LCHlch(32.59 74.45 314.99)
OKLaboklab(0.4491 0.1315 -0.1479)
OKLCHoklch(0.4491 0.1979 311.64)
Decimal7872418

Properties

Color TonePurple, Crimson, Magenta
Closest named colordarkmagenta ΔE 5.9
Closest web-safe color#663399
Hue281°
Saturation (HSL / HSV)68% / 81%
Lightness (HSL)38%
Brightness or Value (HSV)64%
Luminance (Rec.601 / Rec.709)28% / 23%
Relative luminance (WCAG)0.0758
Red / Green / Blue120 / 31 / 162

WCAG 2.2 Contrast Ratio

On White (#ffffff)
8.35:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
2.52:1
AA Normal (4.5:1) · FailAA Large (3:1) · FailAAA Normal (7:1) · Fail
Aa Bb 123

APCA Contrast Lc (reference) — As text on white / black: Lc 87.6 / -14.6 · As background with white / black text: Lc -92.3 / 16.4

Lightness Scale (OKLCH 50–950)

Eleven steps that change only perceived lightness while keeping hue and chroma — ready to use as design-system color tokens.

Tints (mixed with white)

Shades (mixed with black)

Color Harmonies

Color Vision Deficiency Simulation

Estimated appearance of this color for people with color vision deficiencies (Machado 2009).

Similar Named Colors

Use in CSS

:root {
  --color-brand: #781fa2;
  --color-brand-oklch: oklch(44.91% 0.1979 311.64);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(120 31 162 / 50%); }
/* Tailwind CSS */
<div class="bg-[#781fa2] text-[#781fa2] border-[#781fa2]">