It is obtained through
- Battles and Level Taxes on most of The Desert, plus the final and bonus scenarios of the Lava Plains
You can also buy it in Marketplace.
It is used to upgrade Towers on the Engineering Quarter from level 31 onwards. There are two areas in The Desert that do not have the potential to provide Quality Rainbow Ore, Calamityville and Desert's Grave.
The max stack of Quality Rainbow Ore is 999.