Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -30,8 +30,9 @@ def extract_colors(img, num_colors):
|
|
| 30 |
html = '<div style="text-align: center;"><h2>Color Palette</h2><div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;">'
|
| 31 |
for hex_color in hex_colors:
|
| 32 |
html += f'''
|
| 33 |
-
<div style="
|
| 34 |
-
<
|
|
|
|
| 35 |
</div>
|
| 36 |
'''
|
| 37 |
html += '</div></div>'
|
|
|
|
| 30 |
html = '<div style="text-align: center;"><h2>Color Palette</h2><div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;">'
|
| 31 |
for hex_color in hex_colors:
|
| 32 |
html += f'''
|
| 33 |
+
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px;">
|
| 34 |
+
<div style="background-color: {hex_color}; width: 80px; height: 80px; border: 2px solid #333; border-radius: 10px;"></div>
|
| 35 |
+
<span style="font-size: 12px; font-weight: bold;">{hex_color}</span>
|
| 36 |
</div>
|
| 37 |
'''
|
| 38 |
html += '</div></div>'
|