Every hair dye works by getting color into, or onto, the hair shaft. The difference between a rinse that vanishes in one shampoo and a color that survives months is chemistry: how deeply the dye travels, and whether it reacts once it gets there. Temporary dyes simply coat the surface. Semi-permanent dyes slip partway inside. Permanent dyes trigger a chemical reaction inside the hair itself.

Temporary Hair Dyes: Surface-Level Color

Temporary dyes are the simplest case. Their molecules are too large to enter the hair, so they sit on the outside of the cuticle, the shingle-like outer layer of the shaft. Because nothing penetrates, no ammonia and no oxidizing agent are needed, as a comprehensive scientific review of hair dyes explains.

The colorants themselves are often acid or basic dyes, and many are the same pigments used in food, according to cosmetic chemist Perry Romanowski. Acid dyes wash away fastest because they adhere weakly to hair; basic dyes cling slightly better but still rinse out readily.

The result? Color that lasts only a few days and disappears within one or two shampoos. You get vibrancy and low commitment, with essentially no structural change to the hair.

Semi-Permanent Hair Dyes: Gentle Penetration

Semi-permanent dyes take one step inward. Their dye molecules are small and already fully formed, so-called direct dyes, meaning no chemical reaction is required to produce the color. They penetrate the surface of the hair into the cuticle layer, and sometimes reach the outer cortex, where they become trapped.

Because the dyes are pre-formed, there is no ammonia and no hydrogen peroxide. The color stains the outer structure of the hair rather than bonding inside it. According to a technical presentation on the chemistry of hair coloring prepared for the Cosmetic Ingredient Review, the color is trapped in the cuticle with no significant deeper penetration, and washes out after roughly six to eight shampoos.

One nuance worth knowing: some semi-permanent dyes are also used inside permanent dye products to refine the final tone. That is a supporting role, not the mechanism of a standalone semi-permanent color.

Demi-Permanent Hair Dyes: Mild Oxidation for Lasting Color

Demi-permanent dyes are the bridge category. They use oxidative chemistry, but gently. A low level of hydrogen peroxide, around one to two percent, delivers only low bleaching of the hair's natural melanin. Instead of ammonia, an alkalizing ingredient such as ethanolamine swells the hair just enough to help dye precursors enter.

Once inside, the peroxide oxidizes those precursors, forming large colored molecules called chromophores. Because these are big, they cannot migrate deep into the fiber, and because hair swelling is minimal, penetration stays shallow. The trade-off is a limited shade range: demi-permanent color cannot lighten natural hair, but it lasts longer than semi-permanent color.

Permanent Hair Dyes: Deep Transformation

Permanent color is a multi-step chemical event, not a coating. It starts with an alkalizing agent, typically ammonia, which swells the hair and lifts the cuticle. This opens the door to the cortex, the inner layer where your natural melanin lives.

Next comes hydrogen peroxide, at three to 4.5 percent in permanent products. It does two jobs at once. It bleaches the natural melanin, lightening the underlying hair, and it oxidizes the small dye precursors that have entered the fiber. Those precursors belong to chemical classes such as p-phenylenediamine and p-aminophenol, and they are colorless until the reaction begins.

Inside the cortex, the oxidized precursors link together into large, colored chromophores, effectively polymers too big to escape back through the cuticle. Because the dyes penetrate the whole hair fiber, the color is far more wash-fast and can achieve a wide range of shades, from blonde to vibrant red. The cost is structural: significant swelling, bleaching, and deeper disruption of the fiber.

Hair Dye Chemistry: A Comparative Overview

Use this table to match a dye type to your goals. The pattern is consistent: the deeper the penetration and the stronger the chemistry, the longer the color lasts and the greater the potential for damage.

How the four main hair dye types compare chemically
Dye TypeMechanism of ActionKey Chemical AgentsInteraction with Hair ShaftLongevityTypical pH Range
TemporaryLarge dye molecules deposit on the surface; no chemical reactionAcid or basic dyes, often similar to food colorants; no ammonia or peroxideCoats the cuticle surface only; no penetrationRemoved in one or two shampoosAcidic to neutral; not designed to swell the cuticle
Semi-PermanentSmall, pre-formed direct dyes penetrate without oxidationLow molecular weight dyes such as nitro-phenylenediamines, azo and anthraquinone dyesTrapped in the cuticle layer, sometimes reaching the outer cortexWashes out after about 6–8 shampoosNot formulated to significantly swell the hair
Demi-PermanentMild oxidative reaction forms colored chromophoresLow-level hydrogen peroxide (1–2%); ethanolamine as alkalizerMinimal swelling; chromophores stay near the surface, not deep in the fiberLonger than semi-permanent; no lightening of natural colorReported as about pH 10 in one industry presentation; a hairstyling textbook gives 6.0–8.0
PermanentFull oxidative dyeing: cuticle opened, melanin bleached, precursors polymerizedAmmonia; hydrogen peroxide (3–4.5%); dye precursors such as p-phenylenediamineDyes penetrate the whole fiber into the cortexHighly wash-fast; grows out rather than washing out9.0–11.0, alkaline

One figure deserves a caveat. The two sources describing demi-permanent pH disagree: the industry chemistry presentation places it near 10, while the hairstyling textbook places it at 6.0–8.0. What both agree on is the principle, that pH drives how much the cuticle swells and therefore how deeply dye can travel.

Choosing Your Color: Longevity vs. Hair Health

You can make an informed choice about hair dye type by balancing desired color longevity against the potential for hair damage, understanding that deeper penetration and oxidative processes lead to more permanent but potentially more damaging results. Want a weekend experiment? Temporary color coats and rinses away. Want weeks of tone refresh without lightening? Semi-permanent or demi-permanent fits. Want to change your base color entirely? Only permanent oxidative chemistry can do that, and only by swelling, bleaching, and rebuilding color inside the cortex.

The same chemistry also explains post-coloring care. Color that lives inside the cortex survives washing; color trapped in the cuticle does not. So the observable signal is the hair's texture and condition after coloring, indicating the extent of cuticle disruption or cortex alteration, and the rate at which the color fades or washes out. Watch those two indicators and you will know exactly which chemistry you chose, and whether it suited your hair.

Sources