Very simple question, i hope theres a simple answer. I am creating a mobile app that receives css styles from a website and translates the colour into the valid view.setBackgroundColor().
So for example once i have extracted a substring from the style that sais "background-color:red;", How would i convert that colour "red" into the correct rgb value which i believe would be view.setBackgroundColor(Color.rgb(255,0,0)) or the correct hexadecimal value which i believe would be view.setBackgroundColor(Color.parseColor("#ff0000")) according to the W3schools color picker?