Changing color of burger menu so that it is not the same at the background color underneath it
<p>I am building a one page website that will have a fixed burger icon for opening the menu. The burger icon has a color the same as certain background colors of some of the pages.  Thus when the burger icon is on these pages it will not be visible. I am looking for a way to be able to change the color of the burger icon when it is on the pages that have the same color.</p>

<p>Let's say the burger icon is normally blue, and the div underneath it is white, here the burger icon remains blue. but if the next div is blue when the burger icon reaches this div it changes its color to white.</p>

<p>My burger icon is an empty div with the below css to make it look like a burger icon. The burger icon is wrapped in an other div with a fixed position.</p>

<pre><code>//HTML Code
&lt;section class="buttonset"&gt;
    &lt;div id="nav_list"&gt;&lt;/div&gt;
&lt;/section&gt;

//CSS Code
.buttonset
{
    height: 50px;
    position: fixed;
    top: 53px;
    left: 55px;
    z-index: 1;
}

#nav_list 
{
  cursor: pointer;
  height: 30px;
  width: 41px;
}

#nav_list:before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 0.17em;
    background: #71ADBE;
    box-shadow: 0 6px 0 0 #71ADBE, 0 12px 0 0 #71ADBE;
    border-radius: 2px;
}
</code></pre>

<p>What I want is to change the background color of the burger icon to a different color when the background color of the div underneath the it is the same as the background color of the burger icon.</p>

<p>i.e if(burger icon = blue &amp; homePage = blue){ burger icon background color change to white; }</p>

<p>In order to achieve this, I think that the code has to be running continuously check what the background color of the pages are so that it will be able to change the color of the burger icon.</p>

<p>Is there any way this can be done? Maybe detecting what background color the page has using javascript or jquery and then changing the color of the burger icon?</p>

<p>Thanks</p>