If a gun does not have an accessory part, its prefix will next be determined by its element, if it has one. Green and blue guns have a chance to spawn with an accessory, while white guns never will. All Legendary, Seraph, and Pearlescent-rarity weapons will always have an accessory, as will all non-unique purple-rarity guns. The accessory prefix occurs on guns with an accessory part, such as a foregrip. The three main groups of prefixes are the accessory, element, and grip prefixes.
Each manufacturer has its own group of prefixes. In Borderlands 2, weapon prefixes are generated in several tiers, with the highest-tier prefix overriding all others.