Skip to content

Farbwechsler Ändere dynamisch die Hintergrundfarbe der Webseite mithilfe vordefinierter oder zufällig generierter Farben.

Notifications You must be signed in to change notification settings

Hasan-Alawadi/Color-Flipper-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Color Flipper

The Color Flipper is a simple web application that allows users to change the background color of the page by clicking on color buttons. It’s a lightweight and intuitive project aimed at beginners, providing a fun way to explore HTML, CSS, and JavaScript fundamentals.

Features

  • Preset Colors: Select from Green, Red, Blue, and Yellow buttons to quickly set the page's background color.
  • Random Color: Click the "Random" button to change the background to a random color.
  • Responsive Design: Adapts to various device sizes for a smooth user experience on both mobile and desktop.

How It Works

The project uses HTML buttons styled with inline CSS to display different color options. JavaScript functions handle the color changes, updating the background color dynamically based on button clicks.

Project Structure

  • index.html: Contains the HTML structure and inline CSS for basic styling.
  • index.js: Contains the JavaScript functions to handle color-changing logic.

Usage

  1. Clone or download this repository.
  2. Open index.html in your browser.
  3. Click on any of the color buttons or the "Random" button to see the background color change.

JavaScript Functions

  • setColor(color): Changes the background to the specified color.
  • randomColor(): Generates a random color and applies it to the background.

Setup

No additional setup is required. Simply open index.html in a web browser.

Future Enhancements

Possible improvements could include:

  • Adding more color options.
  • Enabling custom color input.
  • Animating the background transition for a smoother effect.

About

Farbwechsler Ändere dynamisch die Hintergrundfarbe der Webseite mithilfe vordefinierter oder zufällig generierter Farben.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published