#402F56 Color Information

Hex color code: #402F56

A soft purple shade, #402F56 appears as (64, 47, 86) in RGB and (266°, 29%, 26%) in HSL. It is typically applied in digital products.

Try:
Color NameDark Slate Gray
HEX
#402F56
RGB
64, 47, 86
HSL
266°, 29%, 26%
CMYK
26%, 45%, 0%, 66%

Shades

CSS Usage
color: #402F56;
background-color: #402F56;
border-color: #402F56;
box-shadow: 0 0 10px #402F56;
border: 2px solid #402F56;
Tailwind Usage
bg-[#402F56]
text-[#402F56]
border-[#402F56]
shadow-[0_0_10px_402F56]

Generate Gradient

Gradient CSS
background: linear-gradient(90deg, #402F56, #FF5733);

Preview in UI

Button

.btn-primary { background-color: #402F56; color: #FFFFFF; }

Badge

New Feature
.badge { background-color: #402F56; 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 #402F56; background-color: #402F5615; }

Alert / Toast

This is an alert using your color as accent.
.alert { background-color: #402F5620; border-left: 4px solid #402F56; }

Link / Accent

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

a { color: #402F56; }

Related Colors

Complementary

Analogous

Triadic

Split Complementary

Tetradic

Monochromatic

Popular Colors

Common HEX Colors

Color Theory

Relationships based on the position of #402F56 in the color wheel.

Current Complementary Triadic Analogous

RGB, HSL and CMYK Values

RGB

64, 47, 86

Red: 64 / Green: 47 / Blue: 86

HSL

266°, 29%, 26%

Hue: 266° / Saturation: 29% / Lightness: 26%

CMYK

26%, 45%, 0%, 66%

Cyan: 26% / Magenta: 45% / Yellow: 0% / Key: 66%

What color is #402F56?

#402F56 is a blue-purple hue associated with creativity and luxury.

Color Shades

Complementary Colors

Color Palette

HEX to RGB

Convert #402F56 to RGB:

rgb(64, 47, 86)HEX to RGB Converter →

HEX to HSL

Convert #402F56 to HSL:

hsl(266, 29%, 26%)RGB to HSL Converter →

HEX to CMYK

Convert #402F56 to CMYK:

cmyk(26%, 45%, 0%, 66%)Color Converter →

Color Meaning and Usage

#402F56 is a delicate purple color with RGB values of 64, 47, 86 and HSL of 266°, 29%, 26%. This blue-purple hue evokes creativity and luxury, making it suitable for often used for buttons, highlights, and accents. Lighter variations like #FFFFFF create softer gradients.

The complementary color of #402F56 is #45562F, creating high-contrast pairings. For softer combinations, try analogous colors like #2F3256.

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

Contrast with #402F56

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

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

Need more control? Contrast Checker →

Frequently Asked Questions

What color is #402F56?

#402F56 is a delicate purple color - a blue-purple hue that evokes creativity and luxury.

What is the RGB value of #402F56?

#402F56 in RGB is (64, 47, 86) - 64 red, 47 green, and 86 blue.

How to use #402F56 in CSS?

Use #402F56 directly in your CSS properties like color or background-color.

What colors go well with #402F56?

#45562F (complementary), #2F3256 (analogous), and #1B1424 (lighter shade) work well with #402F56.