Change the background color of my theme widgets

Your widgets will get an ID based on the class name you specify.
You can then write a CSS selector based on those values. Say that you prefix your widget classes with ‘foo_’, then you can select them with:

div[id*="foo_"] {
    background-color: red;
}

To add that to the admin pages add something like this to your functions.php:

add_action('admin_head', 'custom_widget_css');

function custom_widget_css() {
    echo '<style>
        div[id*="foo_"] {
             background-color: red;
        }
  </style>';
}

tech