If i defined a color in resources
#123456
it\'s possible
Cause getResources().getColor
need api > 23. So this is better:
Just for the sake of easy copy & paste:
Integer.toHexString( ContextCompat.getColor( getContext(), R.color.someColor ) );
Or if you want it without the transparency:`
Integer.toHexString( ContextCompat.getColor( getContext(), R.color.someColor ) & 0x00ffffff );