Hello,
in such case you could prepare several bitmaps, each with different colors. Then you create several button config objects and initialize each object with the respective bitmap. Finally, to display a button with the particular color you select the suitable config object in the button. For example, you create one config object for the red button, one for a green button, one for blue button, etc. In the button you select the right config object.
Alternative approach is to use ALPHA8 bitmaps for the buttons. Then you can determine the color by the TintXXX properties. ALPHA8 bitmaps contain opacity information only. They don't have color information. Disadvantage of this approach is that the ALPHA8 bitmap can be tinted by one color at the same time. Its usage depends thus on your expected design. If you want the buttons to display different colors at the same time, the approach will not work. In turn, if you like this approach, please check the attribute Format of the bitmap resources used for the button. It should be Alpha8.
Does it help you further?
Best regards
Paul Banach