eienmojiki commited on
Commit
521b301
·
verified ·
1 Parent(s): 5b806a0

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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="background-color: {hex_color}; width: 80px; height: 80px; border: 2px solid #333; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: {hex_color};">
34
- <span style="background: white; padding: 2px 5px; border-radius: 3px; font-size: 12px; font-weight: bold;">{hex_color}</span>
 
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>'