1. Impurities
2. Heat
Discolored stock is a sign of impurities. Stock cannot be boiled. Boiling releases both fats and impurities. And according to Thomas Keller, that high heat will emulsify the impurities into into the liquid and causes discoloration.
Start with clean bones, rinsed well in cold water, careful to remove any bits of organs and blood. Blood protein will coagulate and discolor the stock.
Start with cold water and just the bones, no vegetables or aromatics , on low heat. Start skimming as soon as impurities rise up. The scum will begin to rise before the stock is at a simmer, it's important to start the skimming at the first sign of scum, and continue until it reaches a simmer. If it's chicken stock, add ice when it's at a simmer. Ice will coagulate the fat so you can see it and remove it.
After removing the fat, add vegetables and aromatics, then agin very slowly bring it to a simmer--and keep skimming. Don't let it boil.