-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcardarellify.html
114 lines (106 loc) · 3.54 KB
/
cardarellify.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
<!-- https://bkimmel.github.io/ -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cardarellify Everything</title>
<meta name="description" content="Sample page">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
h1 {
text-align: center;
}
svg {
display: block;
width: 50%;
height: 40vh;
outline: 1px solid red;
margin: 20px auto;
}
svg rect {
fill: #00FF00;
stroke: red;
stroke-width: 5px;
}
svg circle {
fill: #00FF00;
stroke: red;
stroke-width: 5px;
}
svg text {
text-anchor: middle;
}
svg text.display {
fill: #00FF00;
stroke: #00FF00;
stroke-width: 2px;
font-family: Helvetica, sans-serif;
font-kerning: normal;
font-size: 1.3em;
}
.cardarellify {
filter: url(#fucker);
}
</style>
</head>
<body>
<h1>Replace everything in the #00FF00 channel of your SVGs with Cardarella</h1>
<svg class="normal" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<defs>
<filter id="fucker">
<feColorMatrix type="matrix" values=
"0 0 0 0 0,
0 0 0 0 0,
0 0 0 0 0,
0 1 0 0 -.9"
in="SourceGraphic" result="GREENWASH" />
<fecomponenttransfer in="GREENWASH" result="BLACKWASH" >
<fefunca type="linear" slope="255" intercept="0" />
</fecomponenttransfer>
<feimage result="PIC" width="5" height="5" preserveAspectRatio="xMidYMid slice" edgeMode="duplicate" xlink:href="https://dockyard.com/assets/images/employees/team/brian-cardarella.jpg" />
<fetile in="PIC" result="PICTILE" />
<fecomposite operator="in" k1="0" k2="1" k3="1" k4="0" in2="BLACKWASH" in="PICTILE" result="COMPOSITE" />
<femerge>
<femergenode in="SourceGraphic" />
<femergenode in="BLACKWASH" />
<femergenode in="COMPOSITE" />
</femerge>
<!--
-->
</filter>
</defs>
<text x="50" y="20">Normal</text>
<circle cx="50" cy="50" r="20" />
</svg>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<text x="50" y="20">Cardarellified</text>
<circle class="cardarellify" cx="50" cy="50" r="20" />
</svg>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<defs>
<radialGradient id="greengrad"
fx="50%" fy="50%" r="65%"
spreadMethod="pad"
gradientUnits=" objectBoundingBox">
<stop offset="0%" stop-color="#00ff00" stop-opacity="1"/>
<stop offset="50%" stop-color="#00ff00" stop-opacity="1"/>
<stop offset="100%" stop-color="#000000" stop-opacity="1" />
</radialGradient>
</defs>
<text x="50" y="20">Normal</text>
<circle cx="50" cy="50" r="20" style="fill: url(#greengrad)" />
</svg>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<text x="50" y="20">Cardarellified</text>
<circle class="cardarellify" cx="50" cy="50" r="20" style="fill: url(#greengrad)" />
</svg>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<text class="display" x="50" y="30">Hey</text>
<text class="display" x="50" y="60">Fuckers</text>
</svg>
<svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<text class="display cardarellify" x="50" y="30">Hey</text>
<text class="display cardarellify" x="50" y="60">Fuckers</text>
</svg>
</body>
</html>