-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (34 loc) · 1.06 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Image Colour Palette</title>
<link href="{{ url_for('static', filename='css/styles.css')}}" rel="stylesheet">
</head>
<body>
<body>
<h1>Image Colour Palette Generator</h1>
<h3>Upload an image to generate a colour palette from it</h3>
<form , action="/submit" enctype="multipart/form-data" method="post">
<div class="file-button" >
<label for="file">
Upload image
<input accept="image/png, image/jpeg" id="file" name="file" type="file">
</label>
</div>
<br>
<input class="submit-button" type="submit" value="Submit">
</form>
{% if hex_success == True: %}
<p>The Top 10 occurring colours in this image are shown below</p>
{% for hex in palette_hex %}
<div class="color-card">
<div class="show-color" style="background-color:{{ hex }};"></div>
<div class="show-hex-info">Hex Code: {{ hex }}</div>
<div class="show-rgb-info">RGB Code: {{ palette_rgb[loop.index - 1 ] }}</div>
</div>
<br>
{% endfor %}
{% endif %}
</body>
</html>