Create a js function where you change the background color of the elements you want to a darker color, and add the current settings of the light mode.(by using an if else statement)
Create an html button , add an click event on it, and by pressing it you should be switching between light/dark mode.
If you have any other questions feel free to show us your code, and sololearn users will do their best to help you. 😀