Quoted By:
Color Change now activates before getting hit.
So Kecleon is now weak to Dragon and Ghost, resistant to Fire, Water, Grass, Electric, Ice, Poison, Psychic, Dark, and Steel, and neutral to Normal, Fighting, Ground, Rock, Bug, Flying, and Fairy.
As well as immune to moves like Will O Wisp, Thunderwave, Toxic, and most powder moves.
Kecleon won't change type if it's already immune to the attack or if the attack misses.