Rainbow provides the Fighting cost. At the same time, it provides Fire, so you could discard it if the attack called for it.
This is why you discard all Rainbow-like Energy when using Charizard d's Metal Burn. If you had a Rainbow, two Metal, and a Grass attached, you could do Metal Burn because Rainbow provides the Lightning's cost. But since Rainbow provides Metal Energy, it would get discarded along with the real Metals when you performed the attack.