#400080 color codes
- HEX
- #400080
- HEX8
- #400080FF
- HEX8 (Android)
- #FF400080
- RGB
- rgb(64, 0, 128)
- RGB (%)
- 25%, 0%, 50%
- HSL
- hsl(270, 100%, 25%)
- HSV / HSB
- hsv(270, 100%, 50%)
- CMYK
- cmyk(50%, 100%, 0%, 50%)
- OKLCH
- oklch(0.3221 0.176 295.82)
- OKLCH (%)
- oklch(32.21% 0.176 295.82)
- Decimal
- 4194432
What color is #400080?
#400080 sits at 32% lightness and 0.176 chroma in OKLCH, hue 295.82°. Its nearest named color is Indigo.
Shades and tints of #400080
Tints
Shades
Tones
#400080 color harmonies
Complementary
Analogous
Triadic
Split-complementary
Tetradic
Square
Monochromatic
Using #400080 in CSS
.text { color: #400080; }
.background { background-color: #400080; }
.border { border: 2px solid #400080; }
/* Modern, perceptually uniform */
.text { color: oklch(0.3221 0.176 295.82); }
/* #400080 at 50% transparency */
.overlay { background-color: #40008080; }Is #400080 accessible?
#400080 on white text scores 13.73:1; on black text it scores 1.53:1. White text passes WCAG AAA on #400080. Recommended text color on a #400080 background: white.
A 1.53:1 vs black
A 13.73:1 vs white
- AA normal ≥ 4.5 Pass
- AA large ≥ 3 Pass
- AAA normal ≥ 7 Pass
- AAA large ≥ 4.5 Pass
Recommended text color: white
CSS
contrast-color() contrast-color(#400080) → white APCA Lc experimental 101.9 Lc · body text — preferred (white text)
WCAG 2.1 AA/AAA is the compliance floor; APCA is an optional readability metric.
Related colors
Nearest featured color: Purple #800080. See more in the purple family on the colors hub.
Frequently asked questions
- What color is #400080?
- #400080 is closest to Indigo. In RGB it is rgb(64, 0, 128), and in HSL hsl(270, 100%, 25%).
- What is #400080 in RGB?
- #400080 converts to rgb(64, 0, 128) — red 64, green 0, blue 128.
- What text color is readable on #400080?
- White text — it has the higher contrast ratio (13.73:1) against #400080. White text passes WCAG AAA on #400080.