When a creature with trample is blocked by one or more creatures that have protection from the attacking creature's color, the protection ability makes those blockers unable to be dealt damage by that source (CR 702.16b: protection prevents damage from the specified source). This means the attacker cannot legally assign any damage to those blockers.
Under the trample rules (CR 702.19b), a trampling attacker must assign lethal damage to each blocking creature before assigning any damage to the defending player. However, CR 702.16b specifies that a creature with protection cannot be dealt damage by the protected-against source — meaning assigning damage to it would have no effect, and more importantly, it cannot count as 'lethal' damage for trample purposes. Because you cannot assign damage to a blocker that is immune to it, all of the attacker's damage must be assigned to the defending player.
This is confirmed by the interaction rule that protection from a color means the creature is immune to Damage, Enchantments, Equipment, Blocking, and Targeting from that color (the DEBT acronym). The 'D' — damage prevention — is the key part here.
Example: Your 5/5 green Trampler attacks. Your opponent blocks with a 2/2 creature that has protection from green. Because the blocker cannot be dealt damage by your green creature, you cannot assign any damage to it. All 5 damage is assigned to the defending player instead, dealing 5 damage to them.
Note: If the attacker has multiple colors and the blocker only has protection from one, only damage from that color is prevented — but since a single creature's combat damage is one assignment, the full damage still cannot be assigned to the blocker. The result is the same: all damage tramples through to the player.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.