A fairly common situation arises when fish literally change colour, either all over or just parts of the body. The most common situation is when previously coloured fish turn white. Fish skin colouring is a complex subject. Fish skin contains different types of pigment cells or chromatophores, which are under the control of the hormonal and nervous systems.
Fish which are diseased often change colour, but this is usually a fading/darkening/dulling of the skin rather than an actual colour change. There are a few conditions in which there is a colour change but these are rare.
The most common causes are either nutritional deficiencies, so one could try a change of diet, water chemistry such as pH or hardness, or simply genetics.
In virtually all cases the fish appear perfectly healthy apart from the colour change and eat and swim normally. So apart from perhaps changing the diet and checking water parameters there is nothing that can be done to reverse the colour change.
As a thought, it might be a little upsetting if your goldfish becomes a whitefish, but pity the koi owner who has paid several hundred pounds (or dollars) because of the fish’s perfect colours / pattern, simply to watch the colour and patterns disappear!!!!