-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpicking-colors.html
70 lines (63 loc) · 1.55 KB
/
picking-colors.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<style>
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
body {
font-family: monospace;
background-color: black;
color: white;
}
h1 {
margin: 5px;
}
.swatch {
display: inline-block;
margin: 0.5em 0.125em 0.5em 0.125em; /* TRoBLe */
width: 6em;
height: 6em;
}
.center {
width: 100%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-flex-flow: column;
flex-flow: column;
-webkit-box-align: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
-webkit-align-content: center;
-webkit-align-items: center;
justify-content: center;
align-content: center;
align-items: center;
}
.color {
width: 80%;
height: 80%;
}
</style>
</head>
<body>
<h1>Picking Distinct Colors</h1>
</body>
<script id="label" type="template">
<h2>%(label)s</h2>
</script>
<script id="template" type="template">
<div class="swatch" style="background-color: %(color)s;">
<div class="center">
<div class="color" style="color: %(textColor)s;">%(index)s</div>
</div>
</div>
</script>
<script data-main="js/picking-colors.js" src="js/require.js"></script>
</html>