A MapGuide Layer Definition is an xml document.
You can find the part of the document that contains your polygon style, and repeat it 50+ times, each time with different colors and theme rules.
Then to load back this xml document, use the mapagent interface. My blog shows how this is done:
http://themapguyde.blogspot.com/2009/07/resource-templating-in-mapguide.html
Hope that helps,
- Jackie