My solution is to use PHP to detect what server I am connected to and then update Administrative screens of my application (WordPress, Drupal etc.) with a specific color. You could also display a color bar at the top of local and staging sites as well.
Here is what I do for WordPress admin screens:
// determine if this is development, staging or production environment
if (strpos(home_url(),'http://localhost') !== false)
{
define('MY_ENVIRONMENT', 'DEV');
}
else if (strpos(home_url(),'') !== false)
{
define('MY_ENVIRONMENT', 'STAGE');
}
else
{
define('MY_ENVIRONMENT', 'PROD');
}
And then I used this to show specific colors in WordPress admin screen:
function change_admin_color($result) {
return (MY_ENVIRONMENT== 'PROD' ? 'sunrise' : (MY_ENVIRONMENT== 'STAGE' ? 'ocean' : 'fresh'));
}
add_filter('get_user_option_admin_color','change_admin_color');