I am trying to convert a hex value to an int so I can create a new color drawable. I\'m not sure if this is possible, but according to the documentation, it should. It plainly a
Since you're talking about hex you have to start with 0x
and don't forget the opacity.
So basically: 0xFFFF6666
ColorDrawable cd = new ColorDrawable(0xFFFF6666);
You can also create a new colors.xml file into /res and define the colors like:
#FF6666
and simply get the color defined in R.color.mycolor
getResources().getColor(R.color.mycolor)