#40274E Color Information

Hex color code: #40274E

The hex color #40274E is a dark purple with RGB values of (64, 39, 78) and HSL of (278°, 33%, 23%). It is frequently seen in web interfaces.

Try:
Color NameDark Slate Gray
HEX
#40274E
RGB
64, 39, 78
HSL
278°, 33%, 23%
CMYK
18%, 50%, 0%, 69%

Shades

CSS Usage
color: #40274E;
background-color: #40274E;
border-color: #40274E;
box-shadow: 0 0 10px #40274E;
border: 2px solid #40274E;
Tailwind Usage
bg-[#40274E]
text-[#40274E]
border-[#40274E]
shadow-[0_0_10px_40274E]

Generate Gradient

Gradient CSS
background: linear-gradient(90deg, #40274E, #FF5733);

Preview in UI

Button

.btn-primary { background-color: #40274E; color: #FFFFFF; }

Badge

New Feature
.badge { background-color: #40274E; color: #FFFFFF; }

Text Highlight

The quick brown fox jumps over the lazy dog. highlighted text example shows how the color looks as a text highlight.

Card

Card Title

This card uses your color as a border accent.

.card-accent { border: 2px solid #40274E; background-color: #40274E15; }

Alert / Toast

This is an alert using your color as accent.
.alert { background-color: #40274E20; border-left: 4px solid #40274E; }

Link / Accent

This is a paragraph with a link using your color. The color can be applied to interactive elements.

a { color: #40274E; }

Related Colors

Complementary

Analogous

Triadic

Split Complementary

Tetradic

Monochromatic

Popular Colors

Common HEX Colors

Color Theory

Relationships based on the position of #40274E in the color wheel.

Current Complementary Triadic Analogous

RGB, HSL and CMYK Values

RGB

64, 39, 78

Red: 64 / Green: 39 / Blue: 78

HSL

278°, 33%, 23%

Hue: 278° / Saturation: 33% / Lightness: 23%

CMYK

18%, 50%, 0%, 69%

Cyan: 18% / Magenta: 50% / Yellow: 0% / Key: 69%

What color is #40274E?

#40274E is a magenta-red hue associated with romance and playfulness.

Color Shades

Complementary Colors

Color Palette

HEX to RGB

Convert #40274E to RGB:

rgb(64, 39, 78)HEX to RGB Converter →

HEX to HSL

Convert #40274E to HSL:

hsl(278, 33%, 23%)RGB to HSL Converter →

HEX to CMYK

Convert #40274E to CMYK:

cmyk(18%, 50%, 0%, 69%)Color Converter →

Color Meaning and Usage

A deep purple tone, #40274E has RGB (64, 39, 78) and HSL (278°, 33%, 23%). Known for evoking romance and playfulness, this magenta-red hue is a solid option for clean and minimal interfaces. Lighter variations like #FFFFFF create softer gradients.

The complementary color of #40274E is #354E27, creating high-contrast pairings. For softer combinations, try analogous colors like #2C274E.

Use #40274E in CSS: color: #40274E or background-color: #40274E. Create palettes with Color Palette Generator or check contrast with Contrast Checker.

Contrast with #40274E

Sample text on this color - The quick brown fox jumps over the lazy dog.

Contrast Ratio: 1.62:1
WCAG AA: Fail
WCAG AAA: Fail

Need more control? Contrast Checker →

Frequently Asked Questions

What color is #40274E?

#40274E is a deep purple color - a magenta-red hue that evokes romance and playfulness.

What is the RGB value of #40274E?

#40274E in RGB is (64, 39, 78) - 64 red, 39 green, and 78 blue.

How to use #40274E in CSS?

Use #40274E directly in your CSS properties like color or background-color.

What colors go well with #40274E?

#354E27 (complementary), #2C274E (analogous), and #160E1B (lighter shade) work well with #40274E.