Why does rock salt change colour when it's heated
"Rock salt" contains many impurities, in addition to its main ingredient, sodium chloride. Some trace chemicals in rock salt, such as lithium chloride or sodium carbonate, hold onto water, which might boil out, sizzling and popping, and if your specimen got hot enough, carbonates could decompose.

Even if you had used "table salt", rather than rock salt, chemicals are intentionally added, such as sodium ferrocyanide (to prevent caking), which has a yellowish color and potassium iodide (as a food supplement).

Had you heated pure sodium chloride, there should not have been a color change.