-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjscolor-a2cafbbfc1.html
More file actions
47 lines (40 loc) · 1.09 KB
/
jscolor-a2cafbbfc1.html
File metadata and controls
47 lines (40 loc) · 1.09 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>jscolor Configuration Preview</title>
</head>
<body>
<script src="jscolor.js"></script>
<script>
// These options apply to all color pickers on the page
jscolor.presets.default = {
palette: '#51e2f5 #9df9ef #edf756 #ffa8B6 #a28089'
};
</script>
<input id="picker" value="#FFD700" data-jscolor="{}">
<script>
function chgColor() {
let hex = document.querySelector('#picker').jscolor.toHEXString();
window.parent.postMessage("$('#Canvas_Layer_1 [fill]').attr('fill', '" + hex + "');", "*");
}
function close() {
window.parent.postMessage("close()", "*");
}
function okButton() {
chgColor();
close();
}
function applyButton() {
chgColor();
}
function cancelButton() {
close();
}
</script>
<button onclick="okButton()">ok</button>
<button onclick="applyButton()">apply</button>
<button onclick="cancelButton()">cancel</button>
</body>
</html>
<!-- Downloaded from http://jscolor.com -->