-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
80 lines (77 loc) · 3.22 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
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
77
78
79
80
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Pixel Swap</title>
<link rel="icon" href="./favicon.ico">
<script src="./scripts/pixel-swap.js" defer></script>
<script src="./scripts/color.js" defer></script>
<script src="./scripts/palette.js" defer></script>
<script src="./scripts/image.js" defer></script>
<script src="./scripts/file-helper.js"></script>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"
rel="stylesheet">
</head>
<body>
<header>
<img src="./media/header-icon.png">
<h1>Pixel Swap</h1>
<h2>Quickly swap pixel art color palettes</h2>
</header>
<div id="content">
<div id="body-left">
<label for="matching-method">Color-Matching Method</label>
<select name="matching-method" id="matching-method">
<option value="Euclidean">Euclidean Distance (Fast, Inaccurate)</option>
<option value="Weighted">Weighted RGB (Average)</option>
<option value="CIELAB">CIELAB (Slow, Accurate)</option>
</select>
<hr>
<form>
<label for="palette">Palette (.GPL file):</label><br>
<input type="file" id="palette-input" accept=".gpl" /><br>
</form>
<hr>
<p id="area"></p>
</div>
<div id="body-right">
<div id="body-right-top">
<form>
<label for="image">Image (.PNG file):</label><br>
<input type="file" id="image-input" accept=".png" /><br>
</form>
<a class="download-button" href="foobar" download="pixel-swap" hidden>
<button>Download Result</button>
</a>
</div>
<div id="images">
<div id="after" hidden>
<h3>After</h3>
<img id="after-image" hidden> <!-- Always hidden -->
<a id="image-download" download="pixel-swap">
<canvas id="after-image-preview"></canvas>
</a><br>
</div>
<div id="before" hidden>
<h3>Before</h3>
<img id="before-image" src="./media/artifact_ss.png" hidden> <!-- Always hidden -->
<canvas id="before-image-preview"></canvas><br>
</div>
<a class="download-button" href="foobar" download="pixel-swap" hidden>
<button>Download Result</button>
</a>
</div>
</div>
</div>
<footer>
Made by <a href="https://www.github.com/lunkums">Lunkums</a> © 2022, Palette by <a
href="https://twitter.com/ENDESGA">ENDESGA Studios</a>, Default Sprite by <a
href="https://opengameart.org/users/hansolo">Gökhan</a>, Fonts by Ten
by Twenty
</footer>
</body>
</html>