hexcolors

#402060

Closest named color: midnightblue

About this color

#402060 is a dark purple color. In RGB it is 64, 32, 96, and its closest named color is midnightblue. Text in white is easiest to read on it, with a contrast ratio of 13.18:1.

What does purple mean?

Copy the value you need

Click any row to copy it.

HEX
RGB
HSL
HSV
CMYK
LAB
OKLCH

Is text readable on #402060?

Contrast against white and black text.

Aa Sample
13.18:1 with white text
Passes AAA for all text
Aa Sample
1.59:1 with black text
Fails WCAG contrast

Test your own pair

Make it lighter or darker

Shades keep the same hue. Click one to open the closest color page.

Build a full 50 to 950 scale

Softer versions (tints)

Mixed with white.

Muted versions (tones)

Mixed with gray.

Colors that go with #402060

Ready-made pairings from the color wheel.

Complementary

Split complementary

Explore the color wheel · More colors that go with midnightblue

How it looks with color blindness

Simulated for common types.

Normal
#402060
Protanopia
#002F62
Deuteranopia
#0F305F
Tritanopia
#3A2D3C

Test an image

Copy the code

CSS, Sass and Tailwind.

color: #402060;
background-color: #402060;
--brand: #402060;
$brand: #402060;
bg-[#402060] text-[#402060] border-[#402060]

Similar colors

Nearby colors you might prefer.

Common questions

What is the RGB value of #402060?

#402060 is rgb(64, 32, 96).

What is the closest named color to #402060?

The closest CSS named color is midnightblue (#191970).

What color goes well with #402060?

Its complementary color is #406020. Analogous colors at #202060 and #602060 also work well.

Should I use white or black text on #402060?

White text is easier to read, with a contrast ratio of 13.18:1.

Use this color anywhere

Data, embeds and tools.

Get #402060 as JSON

Embed a color swatch on your site

Add opacity to this color

Pick a different color