Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Colorify-A-Simple-JavaScript-Web-App

Simple interactive web app that changes a circle's color when buttons are clicked. Built with HTML, CSS, and JavaScript as a learning project for web development beginners.

Colorify: My First JavaScript Web App

A simple web application that changes the color of a circle when different buttons are clicked.

Project Overview

This project demonstrates the fundamentals of web development using HTML, CSS, and JavaScript. It's a hands-on approach to learning web development by building a simple interactive application.

Features

  • Change the color of a circle by clicking buttons
  • Simple, responsive design
  • Frontend-only implementation (no backend required)

Project Structure

  colorify/
  ├── index.html    # The structure of the web page
  ├── index.css     # The styling for the web page
  └── index.js      # The JavaScript code for interactivity
  

How to Run

  1. Clone this repository
  2. Open the index.html file in your web browser
  3. Click on the colored buttons to change the circle's color

Code Explanation

HTML (index.html)

The HTML file creates the structure of our web page:

  • DOCTYPE and HTML tags: Define this as an HTML5 document
  • Head section: Contains metadata, title, and links to CSS and JavaScript
  • Body section: Contains the visible content
  • Container div: Wraps all content for styling
  • Circle div: The element that changes color
  • Buttons: Trigger the color change when clicked

CSS (index.css)

The CSS file styles our web page:

  • Body styling: Centers content and sets background color
  • Container styling: Creates a card-like container with shadow
  • Circle styling: Creates a perfect circle with transition effects
  • Button styling: Makes buttons interactive with hover effects
  • Color-specific styling: Each button has its own color scheme

JavaScript (index.js)

The JavaScript file adds interactivity:

  • paint() function: Changes the background color of the circle
  • DOM manipulation: Uses getElementById to find and modify the circle
  • Event handling: Responds to button clicks

Learning Resources

If you're new to web development, here are some resources to help you understand the code:

Next Steps

Here are some ways to extend this project:

  • Add more colors or allow custom color input
  • Add animations when the color changes
  • Add the ability to change the size of the circle
  • Save color preferences using localStorage

License

This project is open source and available under the MIT License.

About

Simple interactive web app that changes a circle's color when buttons are clicked. Built with HTML, CSS, and JavaScript as a learning project for web development beginners.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages