If you would like to see how this is setup to be a theme component in a repository rather than in your local instance, you can copy my repo here:
https://github.com/Lillinator/header-color-bar
Note that I will probably delete the repository in a few days.