From Glitch City Laboratories
|Please note that this glitch does not exist in the main handheld Pokémon games but rather, a home console such as the Nintendo Gamecube.
Within Pokémon Colosseum and Pokémon XD, like all main handheld Pokémon games after Generation I, it is possible for an encountered Pokémon with pseudo-random characteristics to appear as a Shiny Pokémon at a probability of 1 in 8192 encounters. The characteristics of a Shadow Pokémon do not remain constant and are determined by the 'random' 32-bit (or 4 bytes in standard 8-bit convention) personality value, where specifically the 'shininess' is calculated by taking the result of the bitwise xor'd player's ID and 'secret ID' number, taking the result of using the bitwise xor function between the first two words (16-bit) bytes of the Pokémon's personality value and checking whether the bitwise xor function of the two results is less than eight; meaning that there is an 8 in 65536 (or 1 in 8192) chance that the encountered Shadow Pokémon will be shiny.
However, in Pokémon Colosseum and Pokémon XD, if a Pokémon is captured by the player, for unknown reasons the first 16-bit byte or 'word' of the personality value is recalculated, hence there is a 65528 in 65536 (or 8191 in 8192) chance that the Pokémon is no longer shiny after it appears in the player's party, or the storage box system. Likewise, if a non-shiny Pokémon is captured by the player, there is a 1 in 8192 that it appears as a shiny Pokémon in the player's party or the Pokémon storage box. The second 16-bit byte is unchanged, hence a captured Pokémon's gender does not change.