#402F51 color
The hex color #402F51 is a dark, desaturated violet.
In the RGB color model it is made of 25.1% red, 18.4% green and 31.8% blue (64, 47, 81).
Its hue angle is 270°, with 27% saturation and 25% lightness. For print, the CMYK equivalent is 21% cyan, 42% magenta, 0% yellow and 68% black.
The closest named color is Sanctum of Shadows (#3C2F4E), a difference of 1.6 ΔE, which is barely visible.
White text is the more readable choice on this background (contrast 12.05:1).
#402F51 color codes
| HEX | #402F51 | |
|---|---|---|
| RGB | rgb(64, 47, 81) | |
| RGB percent | rgb(25.1%, 18.4%, 31.8%) | |
| HSL | hsl(270, 27%, 25%) | |
| HSV / HSB | hsv(270, 42%, 32%) | |
| CMYK | cmyk(21%, 42%, 0%, 68%) | |
| CIE LAB | lab(22.71, 15.55, -17.91) | |
| CIE LCH | lch(22.71, 23.72, 310.97) | |
| CIE XYZ | xyz(4.616, 3.717, 8.257) | |
| Decimal | 4206417 | |
| Short hex | None (no 3-digit form) |
Color harmonies
Colors that go with #402F51, based on their position on the color wheel.
Complementary
The color opposite on the color wheel (180°). Strongest contrast.
Analogous
Neighbors 30° either side. Calm, natural combinations.
Split complementary
The two colors next to the complement (150° and 210°).
Triadic
Three colors evenly spaced, 120° apart.
Tetradic (square)
Four colors 90° apart.
Shades, tints and tones
Shades (darker, mixed with black)
Tints (lighter, mixed with white)
Tones (mixed with gray)
Contrast and accessibility
| Text on #402F51 | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 1.74:1 | Fail | Fail | Fail |
| Sample text | 12.05:1 | Pass | Pass | Pass |
| #402F51 as text on | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 12.05:1 | Pass | Pass | Pass |
| Sample text | 1.74:1 | Fail | Fail | Fail |
WCAG 2 asks for 4.5:1 for normal text (AA), 7:1 for AAA, and 3:1 for large text. Check other pairs.
Color blindness simulation
How #402F51 looks to people with the most common types of color vision deficiency.
#283652Protanopia
no red cones#2b3650Deuteranopia
no green cones#3e343cTritanopia
no blue cones#363636Achromatopsia
no color vision
CSS examples
.background { background-color: #402f51; }
.text { color: #402f51; }
.border { border: 2px solid #402f51; }
.transparent { background-color: rgb(64 47 81 / 50%); }
.gradient { background: linear-gradient(to right, #402f51, #512f51); }
Similar colors
#3c2f4eSanctum of Shadows#372d52Midnight Pie#3f354fMaharaja#4f325eRoyal Crown#42364cCall It a Night#4e334eShadow Purple#322c56Purple Noir#48295bAcai
Closest common color name: Dark Purple.
Questions
- What color is #402F51?
- #402F51 is a dark, desaturated violet, closest to the named color Sanctum of Shadows. It belongs to the purple family of colors.
- What is the RGB value of #402F51?
- The RGB value is 64, 47, 81: 64 red, 47 green and 81 blue on a 0 to 255 scale.
- What is the complementary color of #402F51?
- The complementary color is #40512F, found by rotating the hue 180° on the color wheel.
- Is black or white text better on #402F51?
- White text. Black text has a contrast ratio of 1.74:1 and white text 12.05:1. WCAG asks for at least 4.5:1 for normal text.