I am assuming your database stores the color in a String format... try this:
theViewYouWishToChange.setBackgroundColor(Color.parseColor(myStringWithAColor));
Question
actually I'm developping an android application .The problem that I want to change the background color for a TextView using a color code that is exported from my database but it works only with CSS (bgcolor), I tried a few kinds of conversions but I n 'I could not solve this problem thank you for helping me examples of color codes from my database : #66FF33 , #CC99FF
Solution
I am assuming your database stores the color in a String format... try this:
theViewYouWishToChange.setBackgroundColor(Color.parseColor(myStringWithAColor));
OTHER TIPS
Color.parseColor("#rrggbb")
i think this is what you want right?