Spaces:
Sleeping
title: AI Color Palette Generator
emoji: 🎨
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: '3.0'
app_file: app.py
pinned: false
AI-Powered Color Palette Generator This application extracts dominant colours from any uploaded image and generates a corresponding colour palette with auto-generated CSS code, making it useful for designers, web developers, and creatives.
Features:
Dominant Colors Extraction: Detect the key colours from an uploaded image. Colour Harmonies: Generates complementary and analogous colour suggestions. Auto-Generated CSS: Get ready-to-use CSS code for web development. Downloadable Palette Image: Download the generated color palette as an image.
How to Use:
Upload an Image: Click the "Upload Image" button and select any image file (PNG, JPEG, etc.). Generate Palette: Click on "Submit" to generate the colour palette. CSS and Palette Image: The app will display the colour palette, corresponding HEX codes, and a downloadable image. You’ll also get the CSS code for easy integration into web projects. Clear Results: Click "Clear" to reset the app and upload a new image.
Installation and Setup
Requirements:
Python radio Pillow NumPy
Clone the Repository: To get started, clone this repository to your local machine:
bash
git clone https://huggingface.co/spaces/USERNAME/SPACE_NAME cd SPACE_NAME
Install Dependencies:
Install the required Python libraries by running:
bash
pip install -r requirements.txt
Requirements for Gradio Space (requirements.txt):
gradio Pillow numpy
Run the App Locally:
Run the app locally using the following command:
bash
python app.py
You will see output similar to:
bash
Running on local URL: http://127.0.0.1:7860 Running on public URL: https://your-app.gradio.live Open your browser and go to the local URL (http://127.0.0.1:7860) or the public URL.