I would like to suggest a minor reconsideration of this. In particular, Transform, Imposter and Mega Evolutions are forme changes, while Color Change, Conversion, Protean, Camouflage, Soak, Reflect Type, Forests's Curse and Trick-or-Treat are not. IMHO it would make sense for Reflect Type to copy the hidden type.How does it work with Mega Evolution?
It works the same way. Mega Pinsir with the IVs for Hidden Power Ground will become Bug/Flying/Ground.
How does it work with Color Change, Conversion and Protean?
They remove all of the Pokemon's types, including hidden. For example: Protean Greninja with the typing Water/Dark/Grass will become only Water-type if it uses Hydro Pump.
How does it work with Camouflage and Soak?
The Pokémon loses all of its types, including hidden, and becomes Normal or Water respectively.
How does it work with Transform, Imposter and Reflect Type?
The hidden type is not copied.
How do Forest's Curse and Trick Or Treat work?
They replace the Pokémon's third type.