From Bulbapedia, the community-driven Pokémon encyclopedia.
Alternate coloration (Japanese: 色違い) of a Pokémon is one of the many differences that a Pokémon can have within its species. Commonly, this is called being a shiny (Japanese: 光る) Pokémon.
Shiny Pokémon in the games may differ in color from their normal counterparts either very little or very much. Usually the former is the case, with some Pokémon, such as Froslass, having their shiny form be only a few shades lighter in color. However, many Pokémon will have a spectacular difference between their normal and shiny variations; even extremely common Pokémon like Caterpie show a dramatic difference.
In the games
In the main series, alternate coloration was introduced in Generation II. This was likely to take fullest advantage of the Game Boy Color, which enhanced Pokémon Gold and Silver and was required for Pokémon Crystal.
When a shiny Pokémon appears in the wild or from a trainer's Poké Ball, stars will surround it and make a pinging sound effect. In Generation II, this ping happens before the Pokémon's call, while in Generations III and IV it happens afterward. On the Pokémon's status screen, its shiny status is indicated in Generation II as three small stars next to its gender and in Generation III and IV as a large star on the status screen. In Generation IV, the Pokémon's Pokédex number will also be colored red instead of black.
In Generation II, shininess is determined by the IVs of a Pokémon. If a Pokémon's Speed, Defense, and Special IVs are 10, and its Attack IV is 2, 3, 6, 7, 10, 11, 14 or 15, it will be shiny. This determination allowed for compatibility with Generation I, as if a shiny Pokémon is traded back, then traded forward, it would retain its shininess. Despite the compatibility allowing for shiny Pokémon to learn Generation I TMs, provided it was a Generation I Pokémon, shiny Pokémon are slightly above average in terms of IVs.
Due to the probability of the IVs lining up in any of these manners to produce a shiny Pokémon, the chance of obtaining one in Generation II is approximately 1/8192.
To highlight alternate coloration, a red Gyarados at the Lake of Rage is part of the main plot of the Generation II games. After its defeat or capture, a Red Scale will be obtained, which can be given to Mr. Pokémon in exchange for an Exp. Share. The red Gyarados is the only Pokémon in the games that will be shiny without fail.
Shininess is inherent to an individual Pokémon; that is, a Pokémon that starts out shiny will always be shiny, and one that is not will never be, provided its data is unaltered. Upon evolution, a Pokémon will retain its shiny status. A shiny Charmander, if leveled up, will eventually become a shiny Charmeleon and then a shiny Charizard, just as a regular Charmander will become a regular Charmeleon and then a regular Charizard. This is due to the status being determined by values inherent to the Pokémon, however, there is a difference in the determination between Generation II and Generation III and IV.
Generations III and IV
In Generation III, most of the data structures were redone. As such, a Pokémon's shininess would no longer need to be linked to its stats due to incompatibilities between the Generation III games and previous generations. The determinant for shininess is instead a calculation based on the Trainer ID number of the player encountering it and the personality value of the Pokémon. The secret ID and trainer ID bytewords are first xored together, and then the first byteword of the personality value is xored with the second byteword of the personality value. If the xor of these two results is less than eight, then the Pokémon is shiny. This results in a probability of 1 in 8192 (8/65536), just as in Generation II. Symbolically:
(Trainer ID) xor (Secret ID) = E
(First byteword of personality value) xor (Second byteword of personality value) = F
if E xor F is less than eight, then the Pokémon is shiny.
It is sometimes thought that the TM Merchant in Pokémon Mystery Dungeon is a shiny Pokémon. It is a Kecleon, and although Kecleon are normally green, it is actually purple, including its sprite. However, though it is alternate-colored (like the Kecleon in The Kecleon Caper), it is not shiny (for the record, shiny Kecleon have a blue stripe instead of a red one).
In the anime
Although the games had not premiered alternate colored Pokémon until Generation II, several Pokémon seen beforehand were colored differently. One such example is the pink Butterfree, the mate of Ash's Butterfree, which appeared as early as the twenty-first episode. This is, however, not the standard alternate coloration for a Butterfree, causing many to not count it. Likewise, the first appearance of a Generation III Pokémon in The Kecleon Caper featured a non-standard alternate colored Pokémon, this time a purple Kecleon.The first remotely shiny Pokémon was a golden Ho-Oh Ash saw in the sky in the first episode and was also the first Johto region Pokémon to be seen.
The first true shiny Pokémon that appeared, however, was a Noctowl in Fowl Play. Ash eventually captured it, and, as in the games, sparkles surround it as it comes from its Poké Ball. Several other shiny Pokémon have appeared as well.
In the TCG
Alternate colored Pokémon have appeared in the TCG as well, first as Shining Pokémon in Neo Revelation and Neo Destiny, and later as Pokémon Star in EX Team Rocket Returns.