Comment obtenir la couleur à partir du fichier couleur dans ADROID STUDIO

int backgroundColor = ContextCompat.getColor(context, R.color.my_view_color);
// Color backgroundColor = ... (Don't do this. The color is just an int.)

myView.setBackgroundColor(backgroundColor);
android developer