I know this is a bit old now but I'm fairly certain it was originally a glitch. Certain IV values in gold and silver would inadvertently change the hex number for colour by one value, which is why most shinys are almost random in change. The term shiny was first officially used in Pokémon black and white. From gen 6 onwards, a shiny colour was manually determined rather than shifting hex values.