There was an advertisement for Outback Steakhouse with this trope. Middle-aged woman tries to dye her hair and it turns out purple or pink. Her husband cancels their reservations at some hoity-toity restaurant and they go to Outback instead, where there are "no rules, just right" and her worries are forgotten.
This was used to explain Princess Sally's varying hair/fur coloring in the early issues of Sonic the Hedgehog: during a mission, Sally fell into a vat of chemicals. Though she came out unscathed, attempts to wash the chemicals out lead her fur and hair being miscolored (from red hair and brown fur, to blonde hair and red fur, to black hair and pink fur and back to red and brown).
A short story that was called "In 50 years who will know?" or something like that, a woman who has said this phrase to her daughter throughout her daughter's life tries to dye her hair, and ends up with it brilliant green. The daughter even likens it to "glow in the dark green"—whereupon she tells her mother these words of dubious comfort.
The (mildly anti-)Soviet classic The Twelve Chairs, by Ilya Ilf and Evgeniy Petrov, has a scene where one of the protagonists tries to dye his hair and eyebrows and mustache a darker color, but the dye is counterfeit and ends up turning him a rabid green color. A second attempt with another dye of no higher quality results in multi-colored hair. The poor sod ends up having to shave his head completely devoid of hair.
In the Star Wars expansion novel I, Jedi, character Corran Horn accidentally dyed his hair green in an attempt to disguise himself as Kieran Halcyon.
In "The Inspiration of Mr Budd" by Dorothy L. Sayers, a man walks into a hairdresser's shop just before closing time and demands to have his hair dyed. The hairdresser, who is the only person in the shop, recognizes the man as a wanted murderer with a large reward for his capture. The hairdresser knows he has no chance of physically overpowering the murderer but wants the reward money, so he deliberately arranges it so that the murderer's hair will turn bright green an hour or two after he leaves the shop.
Variation: In the Kid Detective novel What's a Daring Detective Like Me Doing in the Doghouse?, Stevie and her friend Jesse find a stray dog and decide to give it a bath. While trying to find a bath product that will get the tangles out of the dog's fur, they accidentally use Stevie's mother's henna dye on it, turning the dog's fur green. They immediately nickname the dog "Swampwater".
The Final Destination 3 novelization mentions why Frankie had shaved his head shortly before the events of the film. His attempt at dyeing it resulted in it turning pink.
In Robert Service's poem The Baldness of Chewed-Ear, Chewed-Ear Jenkins wagers $1,000 that his wife can't cure his baldness. The wife tries every hair tonic she can find, even selling stock to Chewed-Ear's friends so they'll try their own ideas on him. When their combined ministrations start to work, Chewed-Ear tries to cheat them by shaving and applying hair-destroying drugs to his scalp when they're not looking. The unholy combination of hair restorers and hair destroyers eventually makes the hair come in - green.
Stephen in the Wayside School series has green hair. In the third book, it was finally revealed to be due to excessive chlorine in a nearby pool.
Cody also tries to dye his hair and it ends up bright red.
Emma of H2O: Just Add Water decided to color her hair and Cleo used a dye called "Scarlet Fever". Luckily for Emma it only showed up in her mermaid form.
This got blended with a Green Aesop, of all things, in an episode of Different Strokes. Kimberly tried washing/rinsing her hair with rainwater caught in a copper bowl. However, it was acid rain, which reacted with the metal and left a layer of green (corroded) copper on her hair...
An episode of The Oprah Winfrey Show was describing how she was involved in harmless pranks. One of the pranks had clients of a hair salon watch a teaser showing people using a shampoo/conditioner caused people's hair to turn out green. It was the same shampoo used in the hair salon.
Happened to CeCe in Shake It Up, although Tinka had secretly switched dye bottles and made it look like Rocky did it.
Referenced at one point in Questionable Content. Raven tries to bleach her hair blonde to appeal to Sven, but instead it comes out "all orangey and gross", so she has to settle for dyeing it neon-pink.
Lia in YU+ME: dream accidentally dyes her hair green when the protagonist forgets to add an ingredient to the (blonde) dye.
In Dela the Hooda Dela — an extraterrestial anthropomorphic fox (Hooda) — tells that most Hoodas are red-green colorblind and her sister once bought green fur dye instead of red-orange. All her (multispecies) school thought she was being rebellous, but her family didn't notice. Her father wasn't colorblind (and a painter to boot), but for some reason he didn't say anything.
Doubly subverted in Pepper Ann. Her hair turned out green when she tried dyeing it blue.
One House of Mouse short was actually about Minnie Mouse accidentally dyeing Pluto's fur purple after mistaking a bottle of purple dye for shampoo. She then tries to find ways to get the purple dye off, including painting the dog with a can of "Pluto-colored Paint" (which is the same shade of orange as Pluto's fur).
Happened to Lou in Rugrats. The main plot dealt with Chuckie getting tired of getting attention from his red hair, so he used Lou's black hair dye. By the end of the episode, exposure to the sun turns both their hair orange. While Chuckie is thrilled to be a redhead again, Grandpa is less than happy. Didi chalks it up to buying hair dye off of an informational.
On Daria, Jane wants to dye her black hair with orange tiger stripes and essentially forces Daria into helping. It comes out looking terrible, and Jane blames Daria, only to later realize that this wasn't really fair and she was sublimating her anger about something else.
In a show of Truth in Television, this also happened to actress Emma Roberts when her hair was supposed to be dyed blonde for her role in It's Kind of a Funny Story.
Chilean writer Isabel Allende told in one of her memoirs that when she was young she tried to bleach her hair blond, but for some reason she ended with green hair. Rosa, one of the characters in The House of the Spirits, was inspired by that experience.
Sometimes, recently dyed hair has an... interesting reaction to the chemicals in swimming pools causing discoloration. Specifically, hair bleached with peroxide really does turn green when exposed to too much chlorine.
Cheaper men's hair regeneration topics used to do this.
This is the origin of the Elderly Blue-Haired Lady. You see, some people's hair turns an ugly yellow color instead of white or gray when they age. In the 70s, salons would typically treat this with a little bit of blue dye to counteract the yellow, but since different people's hair absorbs pigment at different rates, some people wind up with bright blue hair.
In general, if people try to dye their hair so they just get tint of color, rather than actually changing the color of your hair, be careful or, well, read the trope name.