How can I change whole site color with toggle a button

@jonatandor35 Sorry J.D to make you confused I visited the link and found some subjects about Store an item in memory storage and Retrieve an item from session storage
there is some code I mean I need to copy those code to my masterPage.js?