Changing "site-header" background color on multiple pages

Is there a way to program the background color of the header to change depending on the page I am on ?

For example, if i’m on my front page I would get a blue colored site-header but if I’m on a page called “contacts” (example) the color would be green.

thank you

I believe that there should be some plugin that could do this for you without need to write your own code.

Otherwise there is conditional tags available in WordPress that you can use to apply. These might be tricky but they get the job done.