The generation of a non-mainline game (by mainline games, I mean games like Red/Blue, Gold/Silver/Crystal, Ruby/Sapphire/Emerald, etc) is typically correspondent to the same generation of the latest mainline game that had been released at the time. For example, FireRed and LeafGreen were released during the Ruby and Sapphire era, so FireRed and LeafGreen are considered to be part of Generation 3 despite taking place in Kanto and following the plot of the Gen 1 games Red and Blue. Other remakes like Omega Ruby and Alpha Sapphire would be part of Gen 6, Brilliant Diamond and Shining Pearl would be part of Gen 8, and HeartGold and SoulSilver would be part of Gen 4.