Skip to content

Commit 4c7bab9

Browse files
committed
Updated palette swapper ui
1 parent ae9e6a9 commit 4c7bab9

File tree

2 files changed

+41
-10
lines changed

2 files changed

+41
-10
lines changed

paletteswapper.html

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,42 @@
55
<title>Palette Swapper</title>
66
<link rel="icon" href="neralogo.png">
77
<style>
8+
@font-face {
9+
font-family: mcfont;
10+
src: url(mcfont.ttf);
11+
}
12+
input, select, button, #downloadbtn {
13+
padding:4px;
14+
color:white;
15+
width:100%;
16+
margin:24px 0;
17+
font: 16px mcfont, sans-serif;
18+
text-shadow: 2px 2px black;
19+
box-sizing: border-box;
20+
}
21+
input, select {
22+
background-color:black;
23+
border:1px solid white;
24+
outline:0;
25+
}
26+
button, select {
27+
cursor:pointer;
28+
}
29+
button, #downloadbtn {
30+
background-color:#6B6B6B;
31+
outline:4px solid black;
32+
border-top: 4px solid #AAAAAA;
33+
border-left: 4px solid #AAAAAA;
34+
border-bottom: 4px solid #535353;
35+
border-right: 4px solid #535353;
36+
padding:0 auto;
37+
text-decoration: none;
38+
}
39+
40+
841
body {
42+
font: 16px mcfont, sans-serif;
943
background-color:#8B8B8B;
10-
font:50px 'Nanum Gothic', sans-serif;
1144
width:100%;
1245
margin:0;
1346
overflow:hidden;
@@ -39,14 +72,9 @@
3972
image-rendering:pixelated;
4073
}
4174
p {
42-
font:20px 'Nanum Gothic', sans-serif;
4375
padding:0px;
4476
margin:0px;
4577
}
46-
input, input::file-selector-button, button {
47-
padding:0 5px 3px 5px;
48-
font: 20px 'Nanum Gothic', sans-serif;
49-
}
5078
#bigarrow {
5179
font-size:90px;
5280
}
@@ -61,9 +89,10 @@
6189
-webkit-border-radius: 3vh;
6290
border-radius: 3vh;
6391
}
92+
#One, #Two {
93+
display: none;
94+
}
6495
</style>
65-
<link rel="preconnect" href="https://fonts.gstatic.com">
66-
<link href="https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@700&display=swap" rel="stylesheet">
6796
<!-- Google tag (gtag.js) -->
6897
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5DJPSM88KS"></script>
6998
<script>
@@ -78,6 +107,7 @@
78107
<a href="index.html"><img id="baricon" src="neralogo.png"></a>
79108
<div class="half">
80109
<canvas id="canvasOne" width="16" height="16">Your browser does not support the HTML5 canvas tag.</canvas><br>
110+
<button id="FakeOne" onclick="document.getElementById('One').click()">Upload Texture</button>
81111
<input type="file" id="One" name="loaderOne" class="loader"><br>
82112
<canvas id="paletteCanvasOne" width="0" height="1" oncontextmenu="return false;"></canvas>
83113
<p id="outOne"></p>
@@ -89,6 +119,7 @@
89119
</div>
90120
<div class="half">
91121
<canvas id="canvasTwo" width="16" height="16">Your browser does not support the HTML5 canvas tag.</canvas><br>
122+
<button id="FakeTwo" onclick="document.getElementById('Two').click()">Upload Texture</button>
92123
<input type="file" id="Two" name="loaderTwo" class="loader"><br>
93124
<canvas id="paletteCanvasTwo" width="0" height="1" oncontextmenu="return false;"></canvas>
94125
<p id="outTwo"></p>
@@ -202,8 +233,8 @@
202233
var img = new Image();
203234
img.onload = function(){
204235
eval("colors"+id+" = go(id,img);");
205-
$("outOne").innerHTML = colorsOne.join(", ");
206-
$("outTwo").innerHTML = colorsTwo.join(", ");
236+
$("outOne").innerHTML = "Length: " + colorsOne.length + "<br>" + colorsOne.join(", ");
237+
$("outTwo").innerHTML = "Length: " + colorsTwo.length + "<br>" + colorsTwo.join(", ");
207238
if (id=="Two") {
208239
imghold=img;
209240
}

screenshots/palette_puller.png

-4.5 KB
Loading

0 commit comments

Comments
 (0)