|
5 | 5 | <title>Palette Swapper</title> |
6 | 6 | <link rel="icon" href="neralogo.png"> |
7 | 7 | <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 | + |
8 | 41 | body { |
| 42 | + font: 16px mcfont, sans-serif; |
9 | 43 | background-color:#8B8B8B; |
10 | | - font:50px 'Nanum Gothic', sans-serif; |
11 | 44 | width:100%; |
12 | 45 | margin:0; |
13 | 46 | overflow:hidden; |
|
39 | 72 | image-rendering:pixelated; |
40 | 73 | } |
41 | 74 | p { |
42 | | - font:20px 'Nanum Gothic', sans-serif; |
43 | 75 | padding:0px; |
44 | 76 | margin:0px; |
45 | 77 | } |
46 | | - input, input::file-selector-button, button { |
47 | | - padding:0 5px 3px 5px; |
48 | | - font: 20px 'Nanum Gothic', sans-serif; |
49 | | - } |
50 | 78 | #bigarrow { |
51 | 79 | font-size:90px; |
52 | 80 | } |
|
61 | 89 | -webkit-border-radius: 3vh; |
62 | 90 | border-radius: 3vh; |
63 | 91 | } |
| 92 | + #One, #Two { |
| 93 | + display: none; |
| 94 | + } |
64 | 95 | </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"> |
67 | 96 | <!-- Google tag (gtag.js) --> |
68 | 97 | <script async src="https://www.googletagmanager.com/gtag/js?id=G-5DJPSM88KS"></script> |
69 | 98 | <script> |
|
78 | 107 | <a href="index.html"><img id="baricon" src="neralogo.png"></a> |
79 | 108 | <div class="half"> |
80 | 109 | <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> |
81 | 111 | <input type="file" id="One" name="loaderOne" class="loader"><br> |
82 | 112 | <canvas id="paletteCanvasOne" width="0" height="1" oncontextmenu="return false;"></canvas> |
83 | 113 | <p id="outOne"></p> |
|
89 | 119 | </div> |
90 | 120 | <div class="half"> |
91 | 121 | <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> |
92 | 123 | <input type="file" id="Two" name="loaderTwo" class="loader"><br> |
93 | 124 | <canvas id="paletteCanvasTwo" width="0" height="1" oncontextmenu="return false;"></canvas> |
94 | 125 | <p id="outTwo"></p> |
|
202 | 233 | var img = new Image(); |
203 | 234 | img.onload = function(){ |
204 | 235 | 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(", "); |
207 | 238 | if (id=="Two") { |
208 | 239 | imghold=img; |
209 | 240 | } |
|
0 commit comments