#402161 color
The hex color #402161 is a dark, desaturated violet.
In the RGB color model it is made of 25.1% red, 12.9% green and 38% blue (64, 33, 97).
Its hue angle is 269°, with 49% saturation and 25% lightness. For print, the CMYK equivalent is 34% cyan, 66% magenta, 0% yellow and 62% black.
The closest named color is Fading Horizon (#442266), a difference of 1.1 ΔE, which is barely visible.
White text is the more readable choice on this background (contrast 13.06:1).
#402161 color codes
| HEX | #402161 | |
|---|---|---|
| RGB | rgb(64, 33, 97) | |
| RGB percent | rgb(25.1%, 12.9%, 38%) | |
| HSL | hsl(269, 49%, 25%) | |
| HSV / HSB | hsv(269, 66%, 38%) | |
| CMYK | cmyk(34%, 66%, 0%, 62%) | |
| CIE LAB | lab(20.21, 28.95, -32.5) | |
| CIE LCH | lch(20.21, 43.52, 311.7) | |
| CIE XYZ | xyz(4.815, 3.041, 11.64) | |
| Decimal | 4202849 | |
| Short hex | None (no 3-digit form) |
Color harmonies
Colors that go with #402161, 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 #402161 | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 1.61:1 | Fail | Fail | Fail |
| Sample text | 13.06:1 | Pass | Pass | Pass |
| #402161 as text on | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 13.06:1 | Pass | Pass | Pass |
| Sample text | 1.61: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 #402161 looks to people with the most common types of color vision deficiency.
#003063Protanopia
no red cones#0f3160Deuteranopia
no green cones#3a2e3dTritanopia
no blue cones#313131Achromatopsia
no color vision
CSS examples
.background { background-color: #402161; }
.text { color: #402161; }
.border { border: 2px solid #402161; }
.transparent { background-color: rgb(64 33 97 / 50%); }
.gradient { background: linear-gradient(to right, #402161, #602161); }
Similar colors
#442266Fading Horizon#341758Fabric of Space#332266Dark Dreams#372354Stormy Night#431c53Plunged Into Darkness#37115cWicked Purple#432e6fHer Highness#4b2c74Mystic Nights
Closest common color name: Midnight Blue.
Questions
- What color is #402161?
- #402161 is a dark, desaturated violet, closest to the named color Fading Horizon. It belongs to the purple family of colors.
- What is the RGB value of #402161?
- The RGB value is 64, 33, 97: 64 red, 33 green and 97 blue on a 0 to 255 scale.
- What is the complementary color of #402161?
- The complementary color is #426121, found by rotating the hue 180° on the color wheel.
- Is black or white text better on #402161?
- White text. Black text has a contrast ratio of 1.61:1 and white text 13.06:1. WCAG asks for at least 4.5:1 for normal text.