HEX Color Conversion

Hex Color Code #8040D4 — RGB & HSL Conversions

How to use the #8040D4 color code in HTML & CSS?

To apply the hex color #8040D4 in web design, set the color property inside your CSS stylesheet. For example, adding background-color: #8040D4; will paint elements in this cool undertone shade. In modern CSS structures, you can configure it as a custom variable --color-hex: #8040D4; or utilize it directly in Tailwind CSS via arbitrary utility values like bg-[#8040D4].

What are the RGB and HSL conversion values for #8040D4?

In the digital sRGB color space, the hex value #8040D4 is converted to RGB values of Red: 128, Green: 64, and Blue: 212. When analyzed under the HSL model, its coordinates correspond to hue angle 266°, 63% saturation, and 54% lightness. This makes it visually a balanced medium tone with a balanced, moderate saturation.

CMYK print code settings for #8040D4

When converting #8040D4 for CMYK printing, the color separation consists of 40% Cyan, 70% Magenta, 0% Yellow, and 17% key/black. Purple carries luxury, creative thinking, and sophisticated branding connotations, highly recommended for creative studio layouts.

Red Channel 128
Green Channel 64
Blue Channel 212
Luminance 0.130

HEX #8040D4 Color Space Conversions

Click to copy format
HEX Color Code #8040D4
RGB (Red Green Blue) rgb(128, 64, 212)
HSL (Hue Sat Light) hsl(266°, 63%, 54%)
CMYK (Commercial Print) cmyk(40%, 70%, 0%, 17%)
HSV / HSB Values hsv(266°, 70%, 83%)
Decimal Color Code 8405204
CSS Custom Variable --color-hex: #8040D4;
Tailwind CSS Utility bg-[#8040D4]

Contrast & Accessibility (WCAG 2.1) Check

White Text on Background

White text readability test with #8040D4

Small body copy preview

Black Text on Background

Black text readability test with #8040D4

Small body copy preview

Complementary & Analogous Harmonies

Perfect matching color schemes for your designs

Shades & Tints Generator Matrix

Copy shade hex values instantly

Darker Shades (Adding Black)

Lighter Tints (Adding White)

{ } CSS Custom Properties (Variables)

Copy CSS Styles
/* CSS Custom Properties for color #8040D4 */
--color-hex: #8040D4;
--color-rgb: rgb(128, 64, 212);
--color-hsl: hsl(266deg, 63%, 54%);

Adjacent HEX Color Codes

Copied!