File size: 1,861 Bytes
c1dc946
6090db5
 
 
 
 
 
 
c1dc946
 
 
ef763de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77b298f
ef763de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77b298f
 
 
 
 
 
 
ef763de
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: AI Color Palette Generator
emoji: 🎨
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.43.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.