getColor Error in API Level 23
The old method is deprecated starting in API 23, and the new method only exists in API 23+. You are attempting to call the new method on a device running API <23.
You can either perform an API level check and call the appropriate method, or you can use ContextCompat.getColor(Context, int)
from the support-v4 library.
Try this..
int color = Color.parseColor(getResources().getString(R.color.color_name));
instead
int color = getResources().getColor(R.color.color_name);