Skip to content

vikashkumar016/Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Color Scheme Switcher

A simple JavaScript-based color scheme switcher that allows users to change the background color of a webpage by clicking on colored buttons.

πŸ“Œ Features

Clickable color buttons (Grey, White, Blue, Red)

Instantly changes the background color of the page

Clean and responsive layout

Beginner-friendly HTML, CSS, and JavaScript

Includes a function to generate random colors (optional / extendable)

πŸ› οΈ Technologies Used

HTML5 – Structure of the page

CSS3 – Styling and layout

JavaScript (ES6) – DOM manipulation and event handling

πŸ“‚ Project Structure color-scheme-switcher/ β”‚ β”œβ”€β”€ index.html └── README.md

πŸš€ How It Works

The page displays colored square buttons.

Each button has a unique id representing a color.

JavaScript listens for click events on these buttons.

When clicked, the page background changes to the selected color.

🧠 Key JavaScript Logic let btn = document.querySelectorAll('.button'); const body = document.querySelector('body');

btn.forEach(button => { button.addEventListener('click', (e) => { body.style.backgroundColor = e.target.id; }); });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages