-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
38 lines (34 loc) · 888 Bytes
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>colorLightenTool - demo</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.wrapper {
white-space:pre-wrap;
}
.colorWrapper div {
height: 32px;
}
</style>
<script src="./dist/index.js"></script>
</head>
<body>
<div class="wrapper">
<div class="colorWrapper">
<span>input: rgb(255,000,000)</span>
<div style="background-color: rgb(255,0,0)"></div>
</div>
<div class="colorWrapper">
<span id="outPut"></span>
<div id="outPutColor"></div>
</div>
</div>
<script>
const outColor = colorLightenTool('rgb(255,0,0)', 0.5)
document.querySelector('#outPut').innerHTML = 'output:' + outColor
document.querySelector('#outPutColor').style.backgroundColor = outColor
</script>
</body>
</html>