Free Accessible CSS Gradient Generator

← All Colors
#4B0082 Indigo

Indigo Hex Code #4B0082

Indigo is a dark, strong purple with the hex code #4B0082. In RGB it is 75, 0, 130, and in HSL it is 275°, 100%, 25%. It is one of the 148 named colors in CSS, so you can write “indigo” instead of the hex code.

HEX
#4B0082
RGB
rgb(75, 0, 130)
HSL
hsl(275, 100%, 25%)
HSV
hsv(275°, 100%, 51%)
CMYK
cmyk(42%, 100%, 0%, 49%)
CSS name
indigo

CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.

About Indigo

On a white background Indigo has a contrast ratio of 12.95:1 (AAA), and on black 1.62:1 (Fail). White text is the better choice on top of it.

It sits between the warm and cool halves of the color wheel, so it pairs comfortably with either.

Purple combines the calm of blue with the energy of red. It reads as creative and premium, and is often used by design, media and beauty brands.

Good to know: Indigo is named after the natural dye. CSS indigo (#4b0082) is a deep violet-blue whose hue, about 275°, is closer to violet than to blue.

Shades and tints of Indigo

Tints mix Indigo with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.

Color harmonies for Indigo

These schemes are calculated from Indigo on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.

Analogous

Open in the color wheel

Triadic

Open in the color wheel

Tetradic

Open in the color wheel

Square

Open in the color wheel

On the artist’s RYB wheel, the complement of Indigo is #828100, close to the named color Olive.

Indigo contrast and accessibility

WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Indigo scores against white and black.

Contrast of Indigo with white and black
AgainstRatioAA normalAA largeAAA normalAAA large
White (#ffffff) 12.95:1 ✓ Pass ✓ Pass ✓ Pass ✓ Pass
Black (#000000) 1.62:1 ✕ Fail ✕ Fail ✕ Fail ✕ Fail
Aa White text on Indigo12.95:1
Aa Black text on Indigo1.62:1

Indigo and color blindness

These are approximate previews of how Indigo can look with the main types of color vision deficiency.

Protanopia #003185

Indigo changes noticeably.

Deuteranopia #003180

Indigo changes noticeably.

Tritanopia #3E2E4A

Indigo changes noticeably.

Achromatopsia #313131

Indigo changes noticeably.

Gradients with Indigo

Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.

Indigo to a lighter tint

background: linear-gradient(135deg, #4b0082 0%, #b799cd 100%);

Indigo to its analogous neighbour

background: linear-gradient(135deg, #4b0082 0%, #820078 100%);

Indigo to its complement

background: linear-gradient(135deg, #4b0082 0%, #378200 100%);

Colors similar to Indigo

How each close match differs from Indigo.

More purple colors →

Use Indigo in code

CSS
.element {
  color: #4b0082;
  background-color: #4b0082;
  border-color: indigo;   /* indigo is a valid CSS color name */
}
CSS variable
:root {
  --color-indigo: #4b0082;
}
Tailwind
<!-- Tailwind arbitrary values -->
<div class="bg-[#4b0082] text-[#4b0082] border-[#4b0082]"></div>

/* Tailwind v4 theme color */
@theme {
  --color-indigo: #4b0082;
}

Indigo questions

What is the hex code for Indigo?

The hex code for Indigo is #4B0082. In RGB that is rgb(75, 0, 130), and in HSL it is hsl(275, 100%, 25%).

What is the complementary color of Indigo?

On the RGB (screen) color wheel, the complement of Indigo is #378200, which is close to Green. On the artist’s RYB wheel it is #828100, close to Olive.

Should I use white or black text on Indigo?

White text. It has a contrast ratio of 12.95:1 against Indigo, which is WCAG AAA. The other option scores 1.62:1.

Is Indigo accessible as a text color on white?

Yes. Indigo on white scores 12.95:1, which passes WCAG AA for normal text (4.5:1) and AAA (7:1).

What are darker and lighter shades of Indigo?

Mixing Indigo with black gives #3C0068, #2D004E, #1E0034, #0F001A (20% to 80% black). Mixing it with white gives #6F339B, #9366B4, #B799CD, #DBCCE6 (20% to 80% white).

More color tools