Here are two nice articles that deal with why goldfish change colors....
This one is from Ingrid at GAB...
The colors of fish are due to the presence of pigment cells called chromatophores. Chromatophores come in two varieties: those that absorb light and those that reflect light. Some light-absorbing chromatophores that occur in fish are melanophores, erythophores, xanthophores, and cyanophores. Leucophores and iridophores are examples of light-reflecting chromatophores. Inside chromatophores are organelles called chromatosomes. The type of chromatosome found in a chromatophore determines the color of the pigment cell. For example, melanophores, which are black, contain melanosomes, ie. melanin (black) is the pigment in the chormatosomes of melanophores.
Scientists have identified two types of color changes in fish: physiological and morphological. Physiological color changes are due to the spreading out or aggregation of chromatosomes. When the chromatosomes are spread throughout the cell, the color is more pronounced to the naked eye. However, when the chromatosomes aggregate in the center of the cell, the color is muted or not visable. Morphological color changes, on the other hand, are due to a change in the number of chromatophores. So a fish that loses a number of melanophores will appear lighter, and a fish that gains melanophores will appear darker. Physiological color changes can become morphological color changes over time. For example, a fish that is kept in a tank with a dark background and dark rocks will become darker, initially because of movement of melanosomes in the already exisiting melanophores. However, if enough time goes buy, the fish will start to produce more melanophores and then the color change is considered morphological.
The common phenomenon of black goldfish turning orange, or young goldfish losing black markings as they grow is an example of a morphological color change. As the fish mature, they lose melanophores in a process called apoptosis. Apoptosis is directed cell death, or cellular suicide, and is an important phenomenon in many aspects of development. However, the exact molecular cues that tell a cell it's time to die are still very mysterious. In addition to apoptosis, goldfish that lose black coloration are also supressing the birth of new melanophores. The loss of melanophores reveals the other pigment cells present in the skin. The type and extent of color change a young fish will go through depends on their individual genetic makeup, and there is a lot of variation between individuals! Some fish even go through a second color change from the destruction of xanthophores (red pigment cells).
From Rick at GFC....
I would like to share with you the three most common reasons why goldfish change colors:
1- Genetics plays a big roll in the color of goldfish. When Goldfish Breeders pair their goldfish for breeding, they breed for good goldfish type and color. I'll use the beautiful moor as an example because it is one of the types of goldfish the goldfish breeders use in their goldfish breeding programs that proves my point.
I know you have seen pictures of, or even own a moor that is black as velvet with excellent goldfish type. Some moors will hold this beautiful black-velvet color while others will begin to turn gold. The reason some will turn gold is, in order to improve the bodies and or eyes of the moors, the goldfish breeders will use gold telescopes as a cross.
The goldfish breeders sort the fry (baby goldfish) for type and color at a very early stage in their lives. The fry that are black are moors, the fry that are any other color become telescopes. Now, if the genetics are just right, some of the moors will remain black their whole life, others will turn gold within six months or even years. Some will just have a light colored belly. I'm not saying that all goldfish breeders use this method of breeding, however, many of them do.
2- Goldfish Collectors with new goldfish become concerned when within a few weeks or months their GOLD goldfish start showing signs of big black patches of color on the body and fins. The black is a sign of healing. Like a "black and blue" mark on your arm after you hit it on something. The new fish have been knocked around, handled and bruised from the moment they left the country the were born in.
When you bring them home and begin to give them some tender loving goldfish care, they begin to heal, that's when you see the "black". When I imported hundreds of show quality goldfish each year I was very happy to see the "black" on my GOLD goldfish, that's when I knew I had them strong and healing. It could take two weeks or longer for the "black" to disappear.
3- Now here's a color change that should throw up a big "RED FLAG" to any person who wants to give good goldfish care.
When the colors of you goldfish become very dull and your goldfish becomes inactive, act at once! This is a sign that could mean big health problems! Attention: One major cause of "dull color" are parasites!! Treat ASAP.
I've also had goldfish lose color because of a quick drop in pH. I've had goldfish become thin with dull color after major treatments of antibiotics. The reason? The "good bacteria" in their digestive tract was destroyed by the antibiotics. The nutrients of the food they were eating were not being absorbed into their system and they were starving. That's why we formulated our "Jump Start" to replace the "good bacteria" in their digestive tract. High quality probiotics are a must after any treatment of antibiotics or long sickness.
One and two above are nothing to worry about, but pay special attention to number three.
There are a few other things that could cause color change or dull color , such as poor quality food, and internal worms, however, the three above are the most common.