I had a fetal echocardiogram and the image on the screen showed a lot of yellow, red, blue. What does that mean?

Not much. You probably saw doppler signals - images of how sounds travel through the tissue as seen from the ultrasound probe. As long as the echocardiogram was ok, no need to worry about colors.
Computer coded. Doppler shift is color coded by the computer. The multiple colors you indicate is just part of this artificial color code and nothing to do with color of blood. However it helps to determine the direction and velocity of blood flow. This is useful in studying the function of the heart and it's valves.