-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (126 loc) · 5.43 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html lang="en">
<head>
<title>Color Workshop</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Minimalistic website for palette/color/image manipulation." />
<meta name="robots" content="follow, index">
<meta property="og:title" content="🎨 Color Workshop 🎨">
<meta property="og:type" content="🎨 Color Workshop 🎨">
<meta property="og:description" content="Minimalistic website for palette/color/image manipulation.">
<meta property="og:url" content="https://colorworkshop.netlify.app/">
<meta property="og:image" content="/image.png">
<meta name="author" content="DetKewlDog">
<meta name="theme-color" content="#6A3697">
<meta name="twitter:card" content="summary_large_image">
<link rel="manifest" href="manifest.json" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Cutive">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="data:image/svg+xml,
<svg xmlns='http://www.w3.org/2000/svg' viewBox='12 0 100 100'>
<text y='.9em' font-size='90'>🎨</text>
</svg>"
>
<link rel="apple-touch-icon" href="/g14774.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.css"/>
<script src="https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YJ5Y5G9HXS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-YJ5Y5G9HXS');
</script>
<script src="color.js"></script>
<script src="dragAndDrop.js"></script>
<script src="imageOperations.js"></script>
<style>
.clr-field,
.clr-field button {
border: 2px #282830;
border-radius: 4px;
margin-top: 2px;
margin-right: 0;
height: 60px;
width: 60px;
padding-inline: 2.5px;
}
.clr-field input {
padding-top: 48px;
}
</style>
</head>
<body>
<canvas id="canvas" style="display:none"></canvas>
<canvas id="color-canvas" style="display:none"></canvas>
<section id="app">
<div class="text-small">
<h1 style="margin-top: 15%;">Image Operations</h1>
<canvas id="image"
onclick="loadImage(event);"
ondragover="dragOverHandler(event);"
ondrop="imgDrop(event);"
oncontextmenu="dragOverHandler(event);">
</canvas><br>
<button class="btn" onclick="loadImage(event)">Import Image</button>
<button class="btn" onclick="saveImage(event)">Export Image</button><br>
<button id="ref-pal" class="pal-input" ondragover="setDraggedOver(event)" ondrop="dragToPalInput(event)">Ref pal</button>
<button class="arrow" style="margin-top: 0%;">⇨</button>
<button id="new-pal" class="pal-input" ondragover="setDraggedOver(event)" ondrop="dragToPalInput(event)">New pal</button>
<br>
<button class="btn" onclick="extractPalette()">Extract Palette</button>
<button class="btn" onclick="applyPalette()">Apply Palette</button><br>
<br>
</div>
<div id="workspace">
<div style="text-align: center; width: 100%;">
<h2>🎨 Color Workshop 🎨</h2>
<p>by DetKewlDog</p>
</div>
<button id="addpal" class="btn-pal new" oncontextmenu="return false;" onclick="createPalette()">▼</button>
<footer>
<p class="text-small">Swap ᴄᴛʀʟ ・ Clone ᴀʟᴛ ・ Delete 🖱ʀᴍʙ ・ Palette ⇧sʜɪғᴛ</p>
Site created by <a href="https://detkewldog.netlify.app" target="_blank">DetKewlDog</a>, and is <a href="https://github.com/DetKewlDog/color-workshop" target="_blank">open-source on GitHub</a>
</footer>
</div>
<div class="text-small">
<h1 style="margin-top: 15%;">Color Operations</h1>
<table>
<td>
<label>Operation</label>
<label>Format</label>
<label>Space</label>
</td>
<td>
<div onchange="changeColorOp(event)" dropdown>
Average
Distance
Grayscale
Invert
</div>
<div onchange="changeColorFormat(event)" dropdown>
RGB
HSV
HSL
</div>
<div onchange="changeColorSpace(event)" dropdown>
Linear
Gamma
</div>
</td>
</table>
<p>Inputs</p>
<section id="inputs" style="height: 66px"></section>
<p>Outputs</p>
<section id="outputs" style="height: 66px"></section>
<br>
</div>
</section>
<script src="palette.js"></script>
<script src="colorOperations.js"></script>
<script src="dropdown.js"></script>
<script src="secret.js"></script>
</body>
</html>