This week’s challenge was to incorporate color change into a project. I am going, to be honest, I wasn’t going to follow all the challenges, especially with this one because I have no idea how to get things to change color in code. Eventually, I decided to just add a dark/ light mode to my website.
Let’s get right into the concept.
Concept
Here’s what I want to do: Have a button that once clicked will change the theme or my entire website from night mode to light mode and vice versa.
Here’s How I did it
I created 2 versions of my style.css file, one with all the dark color schemes and light schemes. Hook up a button, toggle, checkmark, or whatever you find is best for you, and create a function for that button to be hooked up to in JS.
#html, I am so used to python comments :|
<button onclick="Theme()">theme</button>
#Js
function Theme(){
}
So, what is in…
[gs-fb-comments]