-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
70 lines (61 loc) · 2.61 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RGBA to Color Matrix</title>
<!-- External CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css">
<link rel="stylesheet" href="css/base.css">
<script src="dist/lite.js"></script>
<link rel="import" href="rgba-matrix.html">
</head>
<body>
<div class="container">
<h1>RGBA <span>to</span> feColorMatrix</h1>
<p>
<a href="https://github.com/andresgalante/RGBAtoFeColorMatrix">The converter</a> was inpsired by <a href="http://alistapart.com/article/finessing-fecolormatrix">this article</a> by <a href="https://una.im/">Una Kravets</a> and built by <a href="https://twitter.com/brianleathem">Brian</a>, <a href="https://twitter.com/priley86">Patrick</a> and <a href="https://twitter.com/andresgalante">Andrés</a>.
</p>
<form action="#">
<div>
<label for="rValue">Red</label>
<input type="number" id="rValue" value="255" min="0" max="255" required>
</div>
<div>
<label for="gValue">Green</label>
<input type="number" id="gValue" value="255" min="0" max="255" required>
</div>
<div>
<label for="bValue">Blue</label>
<input type="number" id="bValue" value="255" min="0" max="255" required>
</div>
<div>
<label for="aValue">Alpha</label>
<input type="number" id="aValue" value="1" min="0" max="1" required>
</div>
</form>
<div id="selectedColor"></div>
<pre id="snippet"><code><svg width="200px" height="200px" viewBox="0 0 200 200">
<defs>
<filter id="colorChange">
<feColorMatrix
type = "matrix"
values="<strong id="rMatrix">1</strong> 0 0 0 0
0 <strong id="gMatrix">1</strong> 0 0 0
0 0 <strong id="bMatrix">1</strong> 0 0
0 0 0 <strong id="aMatrix">1</strong> 0 "/>
</filter>
</defs>
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="PATH_TO_IMAGE/img.jpg" width="200" height="200" x="0" y="0" filter = "url(#colorChange)"></image>
</svg></code>
</pre>
<h2>
<a href="https://github.com/andresgalante/RGBAtoFeColorMatrix"><i class="fa fa-github" aria-hidden="true"></i></a>
</h2>
<!-- custom element -->
<rgba-matrix r="1" g="1" b="1" a="1"></rgba-matrix>
</div><!-- /conatiner -->
<!-- JavaScript -->
<script type="text/javascript" src="js/script.js"></script>
<script src="https://use.fontawesome.com/f190e89842.js"></script>
</body>
</html>