As you might be able to see in the code, the hover color is just a color applied with the Color object and setRGB. This can just as well be done in onPress for a down color as well. All you would need to do is to use a color from the XML file instead of one hardcoded into the script as it is now. Shouldnt be that hard if you understand the basics of the extraction of the properties from the XML file.