Skip to content

abderrahim1210/change-color

Repository files navigation

๐ŸŽจ Change Color Project โ€“ change-color.html

This small project allows users to change the background color of a webpage using JavaScript. Itโ€™s a great beginner-level example of how to manipulate the DOM and use event listeners.

====================
๐Ÿ“ File Structure
====================
change-color.html     โ† Main file containing HTML
change-color.js       โ† Main file containing JS
change-color.css      โ† Main file containing CSS
README.txt            โ† This file

====================
๐Ÿš€ How It Works
====================
- A button is displayed on the screen.
- When the user clicks the button:
  - JavaScript generates a random color (hex or RGB).
  - The background color of the page (or target element) is updated with the new color.
- Optionally, the color value is shown on the screen.

====================
๐Ÿ”ง Technologies Used
====================
- HTML5
- CSS3
- JavaScript

====================
๐Ÿ“ฆ How to Use
====================
1. Open the file `change-color.html` in your browser.
2. Click the "Change Color" button.
3. Enjoy watching the background change colors dynamically.

====================
๐Ÿ“Œ Notes
====================
- You can customize the color generation logic (e.g., fixed palette, gradients).
- A useful UI feature is to show the hex or RGB color value after each change.

====================
๐Ÿ’ก Author
====================
Abderrahim Khali Ali