|
| 1 | +# Color Palette Generator |
| 2 | + |
| 3 | +## Short Description |
| 4 | +This is a simple web application built with Flask that generates a random color palette. Users can specify the number of colors in the palette (between 1 and 10), and the app will display the corresponding colors in a visually appealing way. |
| 5 | + |
| 6 | +## Functionality |
| 7 | +- Generate random color palettes with customizable color count. |
| 8 | +- Display color hex codes for each generated color. |
| 9 | +- Interactive UI to adjust the number of colors displayed. |
| 10 | + |
| 11 | +## Folder Structure |
| 12 | + |
| 13 | + color_palette_generator/ |
| 14 | + │ |
| 15 | + ├── app.py # Main Flask application file |
| 16 | + ├── templates/ |
| 17 | + │ └── index.html # HTML template for the app |
| 18 | + ├── requirements.txt # Python dependencies file |
| 19 | + └── README.md # Instructions for the program |
| 20 | + |
| 21 | + |
| 22 | +## Instructions for Each File: |
| 23 | +1. app.py: |
| 24 | +The main Flask application script, which generates random color palettes and serves them via a web interface. |
| 25 | + |
| 26 | +2. templates/index.html: |
| 27 | +HTML file that displays the color palette on the front end and allows the user to input the number of colors. |
| 28 | + |
| 29 | +3. requirements.txt: |
| 30 | +List of dependencies required to run the project. |
| 31 | + |
| 32 | +## Setup Instructions |
| 33 | +1. Clone the repository or download the project files. |
| 34 | +2. Navigate to the project folder in your terminal: |
| 35 | + ```bash |
| 36 | + cd color_palette_generator |
| 37 | + ``` |
| 38 | +3. Install the required dependencies using pip: |
| 39 | + ```bash |
| 40 | + pip install -r requirements.txt |
| 41 | + ``` |
| 42 | +4. Run the Flask app: |
| 43 | + ```bash |
| 44 | + python app.py |
| 45 | + ``` |
| 46 | +5. Open your browser and go to http://127.0.0.1:5000/ to use the app. |
| 47 | + |
| 48 | + |
| 49 | +## Detailed Explanation |
| 50 | +- The app.py script creates a Flask web server that serves an HTML page (index.html) where users can generate color palettes. |
| 51 | +- The generate_color_palette() function in app.py generates a list of random hexadecimal colors using the random module. |
| 52 | +- The front-end (index.html) uses a form to capture the user's input for the number of colors, and the results are displayed using a simple CSS grid for visualization. |
| 53 | +- Each color is displayed as a square with its corresponding hex code. |
| 54 | +
|
| 55 | +## Output |
| 56 | +
|
| 57 | + |
| 58 | +
|
| 59 | +## Author(s) |
| 60 | +explooit |
| 61 | +https://github.com/ExPl0iT-29 |
| 62 | +
|
| 63 | +## Disclaimers |
| 64 | +- The project uses random color generation and does not guarantee aesthetically balanced palettes. |
0 commit comments