question: public static String convertToRGB ( int color ) { String red = Integer . toHexString ( Color . red ( color ) ) ; String green = Integer . toHexString ( Color . green ( color ) ) ; String blue = Integer . toHexString ( Color . blue ( color ) ) ; if ( red . length ( ) == 1 ) { red = "0" + red ; } if ( green . length ( ) == 1 ) { green = "0" + green ; } if ( blue . length ( ) == 1 ) { blue = "0" + blue ; } return "#" + red + green + blue ; }
target:  Method currently used by onGetDefaultValue method to convert hex string provided in android:defaultValue to color integer.