-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
134 lines (133 loc) · 5.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Color Palette Maker</title>
<link rel="stylesheet" href="styles.css" />
<link rel="icon" href="favicon.png" type="image/png" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js"
integrity="sha512-zInFF17qBFVvvvFpIfeBzo7Tj7+rQxLeTJDmbxjBz5/zIr89YVbTNelNhdTT+/DCrxoVzBeUPVFJsczKbB7sew=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="script.js" defer></script>
</head>
<body>
<div class="main">
<div class="content">
<h1>Color Palette Maker</h1>
<p class="desc">
A unique and intuitive tool for crafting harmonious color palettes. It uses a clever color system (OKLCH) to smoothly transition between a start and end color. Each color you create displays its contrast level and hex code.
</p>
<noscript><strong>Sorry but this application doesn't work properly without JavaScript. Please enable it to to continue.</strong></noscript>
<div class="palette">
<div class="palette-grid" id="color-palette"></div>
</div>
</div>
<div class="sticky-bar"><button id="sidebar-toggle" class="sidebar-toggle">Edit</button></div>
<div id="overlay"></div>
<div class="controls">
<div class="control">
<div class="label-wrapper"><label for="num-tiles-slider">Number of colors</label><output id="num-tiles-output"></output></div>
<input
id="num-tiles-slider"
type="range"
min="2"
max="100"
step="1"
/>
</div>
<div class="control-section-header">
Hue
</div>
<div class="control">
<div class="label-wrapper">
<label for="start-hue-slider">Hue Start</label>
<output id="start-hue-output"></output>
</div>
<input id="start-hue-slider" type="range" min="0" max="360" step="1" />
</div>
<div class="control">
<div class="label-wrapper">
<label for="end-hue-slider">Hue End</label>
<output id="end-hue-output"></output>
</div>
<input id="end-hue-slider" type="range" min="0" max="360" step="1" />
</div>
<div class="control">
<div class="label-wrapper"><label for="hue-slider">Hue Shift</label>
<output id="hue-output"></output>
</div>
<input id="hue-slider" type="range" min="0" max="360" step="1" />
</div>
<div class="control-section-header">
Saturation
</div>
<div class="control">
<div class="label-wrapper">
<label for="start-saturation-slider">Saturation Start</label>
<output id="start-saturation-output"></output>
</div>
<input type="range" id="start-saturation-slider" min="0" max="1" step="0.01">
</div>
<div class="control">
<div class="label-wrapper">
<label for="end-saturation-slider">Saturation End</label>
<output id="end-saturation-output"></output>
</div>
<input type="range" id="end-saturation-slider" min="0" max="1" step="0.01">
</div>
<div class="control">
<div class="label-wrapper">
<label for="saturation-slider">Saturation Shift</label>
<output id="saturation-output"></output>
</div>
<input
id="saturation-slider"
type="range"
min="0"
max="1"
step="0.01"
/>
</div>
<div class="control-section-header">
Lightness
</div>
<div class="control">
<div class="label-wrapper">
<label for="start-lightness-slider">Lightness Start</label>
<output id="start-lightness-output"></output>
</div>
<input id="start-lightness-slider" type="range" min="0"
max="1"
step="0.01" />
</div>
<div class="control">
<div class="label-wrapper">
<label for="end-lightness-slider">Lightness End</label>
<output id="end-lightness-output"></output>
</div>
<input id="end-lightness-slider" type="range" min="0"
max="1"
step="0.01" />
</div>
<div class="control">
<div class="label-wrapper">
<label for="lightness-slider">Lightness Shift</label>
<output id="lightness-output"></output>
</div>
<input
id="lightness-slider"
type="range"
min="0"
max="1"
step="0.01"
/>
</div>
</div>
</div>
</div>
</body>
</html>