#40304C color
The hex color #40304C is a dark, grayish violet.
In the RGB color model it is made of 25.1% red, 18.8% green and 29.8% blue (64, 48, 76).
Its hue angle is 274°, with 23% saturation and 24% lightness. For print, the CMYK equivalent is 16% cyan, 37% magenta, 0% yellow and 70% black.
The closest named color is Sanctum of Shadows (#3C2F4E), a difference of 1.7 ΔE, which is barely visible.
White text is the more readable choice on this background (contrast 12.03:1).
#40304C color codes
| HEX | #40304C | |
|---|---|---|
| RGB | rgb(64, 48, 76) | |
| RGB percent | rgb(25.1%, 18.8%, 29.8%) | |
| HSL | hsl(274, 23%, 24%) | |
| HSV / HSB | hsv(274, 37%, 30%) | |
| CMYK | cmyk(16%, 37%, 0%, 70%) | |
| CIE LAB | lab(22.74, 13.56, -14.52) | |
| CIE LCH | lch(22.74, 19.87, 313.03) | |
| CIE XYZ | xyz(4.476, 3.726, 7.319) | |
| Decimal | 4206668 | |
| Short hex | None (no 3-digit form) |
Color harmonies
Colors that go with #40304C, 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 #40304C | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 1.75:1 | Fail | Fail | Fail |
| Sample text | 12.03:1 | Pass | Pass | Pass |
| #40304C as text on | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 12.03:1 | Pass | Pass | Pass |
| Sample text | 1.75: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 #40304C looks to people with the most common types of color vision deficiency.
#2b364dProtanopia
no red cones#2e374bDeuteranopia
no green cones#3f343aTritanopia
no blue cones#363636Achromatopsia
no color vision
CSS examples
.background { background-color: #40304c; }
.text { color: #40304c; }
.border { border: 2px solid #40304c; }
.transparent { background-color: rgb(64 48 76 / 50%); }
.gradient { background: linear-gradient(to right, #40304c, #4c304a); }
Similar colors
#3c2f4eSanctum of Shadows#3f354fMaharaja#42364cCall It a Night#372d52Midnight Pie#4e334eShadow Purple#403547Royal Decree#4f325eRoyal Crown#443240Voodoo
Closest common color name: Dark Purple.
Questions
- What color is #40304C?
- #40304C is a dark, grayish violet, closest to the named color Sanctum of Shadows. It belongs to the purple family of colors.
- What is the RGB value of #40304C?
- The RGB value is 64, 48, 76: 64 red, 48 green and 76 blue on a 0 to 255 scale.
- What is the complementary color of #40304C?
- The complementary color is #3C4C30, found by rotating the hue 180° on the color wheel.
- Is black or white text better on #40304C?
- White text. Black text has a contrast ratio of 1.75:1 and white text 12.03:1. WCAG asks for at least 4.5:1 for normal text.