In generation 3, a shiny Pokemon could transform into the shiny form of whatever it was facing, even if it wasn't shiny when facing it. (Ex. A shiny Ditto could turn into a shiny Pidgey even if the Pidgey itself was normal when facing it) just like how a normal Ditto would transform into a normal version of whatever shiny you are facing (ex. Normal Ditto transforms into normal Pidgey even if the Pidgey is shiny)
In generation 4 onwards, a Pokemon using transform will only turn into a copy of whatever it's facing. So if what it's trying to transform into is shiny, it transforms shiny even if the Pokemon who is using it is normal (ex. A normal Ditto could turn into a shiny Pidgey if the Pidgey is shiny) And finally, a shiny would turn into a normal Pokemon if it used transform. (Ex. A shiny Ditto using transform on a normal Pidgey would turn into a normal Pidgey)
Source: Experience, having a shiny Mew in generation 3 that knew transform, and transferring it