-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.html
183 lines (182 loc) · 6.23 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, shrink-to-fit=no"
/>
<title>Colorbook - Color schemes for UI design</title>
<meta name="description" content="Color schemes for UI design" />
<link rel="icon" href="favicon.ico" />
<meta itemprop="name" content="Colorbook" />
<meta itemprop="description" content="Color schemes for UI design" />
<meta itemprop="image" content="icons/icon-192x192.png" />
<!-- See https://goo.gl/OOhYW5 -->
<link rel="manifest" href="manifest.json" />
<!-- See https://goo.gl/qRE0vM -->
<meta name="theme-color" content="#ffffff" />
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="Colorbook" />
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta name="apple-mobile-web-app-title" content="Colorbook" />
<!-- Homescreen icons -->
<link rel="apple-touch-icon" href="icons/icon-48x48.png" />
<link rel="apple-touch-icon" sizes="72x72" href="icons/icon-72x72.png" />
<link rel="apple-touch-icon" sizes="96x96" href="icons/icon-96x96.png" />
<link
rel="apple-touch-icon"
sizes="144x144"
href="icons/icon-144x144.png"
/>
<link
rel="apple-touch-icon"
sizes="192x192"
href="icons/icon-192x192.png"
/>
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
<meta name="msapplication-TileImage" content="icons/icon-144x144.png" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- OpenGraph -->
<meta property="og:site_name" content="Colorbook" />
<meta property="og:url" content="https://liyasthomas.github.io/colorbook" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Colorbook" />
<meta property="og:description" content="Color scheme for UI design" />
<meta property="og:image" content="icons/icon-144x144.png" />
<!-- Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@liyasthomas" />
<meta name="twitter:creator" content="@liyasthomas" />
<meta
name="twitter:url"
content="https://liyasthomas.github.io/colorbook"
/>
<meta name="twitter:title" content="Colorbook" />
<meta name="twitter:description" content="Color scheme for UI design" />
<meta name="twitter:image" content="icons/icon-144x144.png" />
<!-- Web Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Poppins:700|Roboto+Mono&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="index.css" />
<script src="https://unpkg.com/vanilla-picker"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker
.register("sw.js")
.then(function (registration) {
console.log(
"ServiceWorker registration successful with scope: ",
registration.scope
);
})
.catch(function (err) {
console.log("ServiceWorker registration failed: ", err);
});
});
}
</script>
</head>
<body>
<main>
<header>
<div class="flex">
<h1 class="logo">Colorbook</h1>
<div class="flex"></div>
<button id="installPWA" onclick="installPWA()">
<img src="icons/pwalogo.svg" alt="PWA" style="height: 16px;" />
</button>
<button id="convert" onclick="convert()">HEX ↔ RGB</button>
<button
onclick="window.open('https://github.com/liyasthomas/colorbook', '_blank')"
>
<img
src="icons/github.svg"
alt="GitHub"
style="margin-right: 8px;"
/>GitHub
</button>
</div>
<nav id="navcircles"></nav>
</header>
<section id="content" contenteditable="true">
<h1>Color schemes for UI design</h1>
</section>
<section id="theming">
<nav class="title">
<span class="circle" id="combocircle"></span>
<h4>Combination</h4>
<div class="flex"></div>
<div>
<button id="random">Random ⭯</button>
</div>
<div>
<button id="swap">Swap ⇌</button>
</div>
</nav>
<div class="family">
<div class="color">
<div class="btn" id="bg-color"></div>
<b>Background</b>
<input
type="text"
readonly
id="bg"
class="hex"
onclick="copy(this.id)"
value="#000000"
/>
</div>
<div class="color">
<div class="btn" id="color"></div>
<b>Foreground</b>
<input
type="text"
readonly
id="fg"
class="hex"
onclick="copy(this.id)"
value="#ffffff"
/>
</div>
</div>
</section>
<section id="gradient">
<nav class="title">
<span class="circle" id="gradcircle"></span>
<h4>Gradient</h4>
<div class="flex"></div>
<div>
Steps:
<input
type="number"
id="steps"
oninput="this.value=this.value.slice(0,this.maxLength)"
min="1"
max="99"
name="steps"
value="10"
maxlength="2"
/>
<button onclick="updateSpitter()">Generate ↻</button>
</div>
</nav>
<div id="gradcolors"></div>
</section>
<section id="matcolors"></section>
<div id="snackbar">Copied</div>
</main>
<script src="index.js"></script>
</body>
</html>