How would one fetch the accent color set in styles, like below, programmatically?
@color/material_green_500<
This worked for me as well:
public static int getThemeAccentColor (final Context context) { final TypedValue value = new TypedValue (); context.getTheme ().resolveAttribute (R.attr.colorAccent, value, true); return value.data; }