Color toColor(XmlObject obj, XSLFTheme theme) {
Color color = null;
for (XmlObject ch : obj.selectPath("*")) {
if (ch instanceof CTHslColor) {
CTHslColor hsl = (CTHslColor)ch;
int h = hsl.getHue2();
int s = hsl.getSat2();
int l = hsl.getLum2();
// This conversion is not correct and differs from PowerPoint.
// TODO: Revisit and improve.
color = Color.getHSBColor(h / 60000f, s / 100000f, l / 100000f);
} else if (ch instanceof CTPresetColor) {
CTPresetColor prst = (CTPresetColor)ch;