How can I change whole site color with toggle a button

@jonatandor35 I visited the link you provided with thank you for that I saw some code regarding Store an item in memory storage and Retrieve an item from session storage should I copy and paste the code in masterPage.js?