getColor() set color from resource file color.xml btn03.setBackgroundColor( getResources().getColor(android.R.color.holo_blue_dark,mainContext.getTheme()); android source 2019.09.30
get color table int how to define colors > values > colors.xml SlateBlue #6A5ACD int color = mActivity.getResources().getColor(R.color.myColor); android source 2019.07.28