#40335B color
The hex color #40335B is a dark, desaturated violet.
In the RGB color model it is made of 25.1% red, 20% green and 35.7% blue (64, 51, 91).
Its hue angle is 260°, with 28% saturation and 28% lightness. For print, the CMYK equivalent is 30% cyan, 44% magenta, 0% yellow and 64% black.
The closest named color is Midnight Pie (#372D52), a difference of 2.5 ΔE, a small difference.
White text is the more readable choice on this background (contrast 11.4:1).
#40335B color codes
| HEX | #40335B | |
|---|---|---|
| RGB | rgb(64, 51, 91) | |
| RGB percent | rgb(25.1%, 20%, 35.7%) | |
| HSL | hsl(260, 28%, 28%) | |
| HSV / HSB | hsv(260, 44%, 36%) | |
| CMYK | cmyk(30%, 44%, 0%, 64%) | |
| CIE LAB | lab(24.36, 15.66, -21.93) | |
| CIE LCH | lch(24.36, 26.95, 305.53) | |
| CIE XYZ | xyz(5.186, 4.213, 10.435) | |
| Decimal | 4207451 | |
| Short hex | None (no 3-digit form) |
Color harmonies
Colors that go with #40335B, 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 #40335B | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 1.84:1 | Fail | Fail | Fail |
| Sample text | 11.4:1 | Pass | Pass | Pass |
| #40335B as text on | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 11.4:1 | Pass | Pass | Pass |
| Sample text | 1.84: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 #40335B looks to people with the most common types of color vision deficiency.
#283a5dProtanopia
no red cones#2a395aDeuteranopia
no green cones#3b3a42Tritanopia
no blue cones#3a3a3aAchromatopsia
no color vision
CSS examples
.background { background-color: #40335b; }
.text { color: #40335b; }
.border { border: 2px solid #40335b; }
.transparent { background-color: rgb(64 51 91 / 50%); }
.gradient { background: linear-gradient(to right, #40335b, #54335b); }
Similar colors
#372d52Midnight Pie#3c2f4eSanctum of Shadows#4a3b6aMeteorite#322c56Purple Noir#4f325eRoyal Crown#3f354fMaharaja#3d3d63Storm Is Coming#2c2c57Deep Sea Base
Closest common color name: Dark Purple.
Questions
- What color is #40335B?
- #40335B is a dark, desaturated violet, closest to the named color Midnight Pie. It belongs to the purple family of colors.
- What is the RGB value of #40335B?
- The RGB value is 64, 51, 91: 64 red, 51 green and 91 blue on a 0 to 255 scale.
- What is the complementary color of #40335B?
- The complementary color is #4E5B33, found by rotating the hue 180° on the color wheel.
- Is black or white text better on #40335B?
- White text. Black text has a contrast ratio of 1.84:1 and white text 11.4:1. WCAG asks for at least 4.5:1 for normal text.