compass-photoshop-gradient-overlay 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -105,38 +105,130 @@
105
105
 
106
106
  // Mix two colors together
107
107
  @function photoshop-blend($mode, $background-color, $foreground-color, $alpha:1) {
108
- $red1: red($background-color);
109
- $green1: green($background-color);
110
- $blue1: blue($background-color);
111
- $red2: red($foreground-color);
112
- $green2: green($foreground-color);
113
- $blue2: blue($foreground-color);
114
-
115
- @if(unquote($mode) == multiply) {
116
- @return rgba(
117
- blend--multiply($red1, $red2),
118
- blend--multiply($green1, $green2),
119
- blend--multiply($blue1, $blue2),
120
- $alpha
121
- );
122
- } @else if(unquote($mode) == screen) {
123
- @return rgba(
124
- blend--screen($red1, $red2),
125
- blend--screen($green1, $green2),
126
- blend--screen($blue1, $blue2),
127
- $alpha
128
- );
129
- } @else if(unquote($mode) == overlay) {
130
- @return rgba(
131
- blend--overlay($red1, $red2),
132
- blend--overlay($green1, $green2),
133
- blend--overlay($blue1, $blue2),
134
- $alpha
135
- );
136
- } @else {
137
- @return rgba(
138
- $foreground-color,
139
- $alpha
140
- );
141
- }
108
+ $mode: unquote($mode);
109
+ $red1: red($background-color);
110
+ $green1: green($background-color);
111
+ $blue1: blue($background-color);
112
+ $red2: red($foreground-color);
113
+ $green2: green($foreground-color);
114
+ $blue2: blue($foreground-color);
115
+
116
+ @if($mode == multiply) {
117
+ @return rgba(
118
+ blend--multiply($red1, $red2),
119
+ blend--multiply($green1, $green2),
120
+ blend--multiply($blue1, $blue2),
121
+ $alpha
122
+ );
123
+ } @else if($mode == screen) {
124
+ @return rgba(
125
+ blend--screen($red1, $red2),
126
+ blend--screen($green1, $green2),
127
+ blend--screen($blue1, $blue2),
128
+ $alpha
129
+ );
130
+ } @else if($mode == overlay) {
131
+ @return rgba(
132
+ blend--overlay($red1, $red2),
133
+ blend--overlay($green1, $green2),
134
+ blend--overlay($blue1, $blue2),
135
+ $alpha
136
+ );
137
+ } @else if($mode == soft-light) {
138
+ @return rgba(
139
+ blend--screen($red1, $red2),
140
+ blend--screen($green1, $green2),
141
+ blend--screen($blue1, $blue2),
142
+ $alpha
143
+ );
144
+ } @else if($mode == hard-light) {
145
+ @return rgba(
146
+ blend--screen($red1, $red2),
147
+ blend--screen($green1, $green2),
148
+ blend--screen($blue1, $blue2),
149
+ $alpha
150
+ );
151
+ } @else if($mode == linear-color-dodge) {
152
+ @return rgba(
153
+ blend--screen($red1, $red2),
154
+ blend--screen($green1, $green2),
155
+ blend--screen($blue1, $blue2),
156
+ $alpha
157
+ );
158
+ } @else if($mode == linear-color-burn) {
159
+ @return rgba(
160
+ blend--screen($red1, $red2),
161
+ blend--screen($green1, $green2),
162
+ blend--screen($blue1, $blue2),
163
+ $alpha
164
+ );
165
+ } @else if($mode == linear-lighten) {
166
+ @return rgba(
167
+ blend--screen($red1, $red2),
168
+ blend--screen($green1, $green2),
169
+ blend--screen($blue1, $blue2),
170
+ $alpha
171
+ );
172
+ } @else if($mode == linear-darken) {
173
+ @return rgba(
174
+ blend--screen($red1, $red2),
175
+ blend--screen($green1, $green2),
176
+ blend--screen($blue1, $blue2),
177
+ $alpha
178
+ );
179
+ } @else if($mode == difference) {
180
+ @return rgba(
181
+ blend--screen($red1, $red2),
182
+ blend--screen($green1, $green2),
183
+ blend--screen($blue1, $blue2),
184
+ $alpha
185
+ );
186
+ } @else if($mode == exclusion) {
187
+ @return rgba(
188
+ blend--screen($red1, $red2),
189
+ blend--screen($green1, $green2),
190
+ blend--screen($blue1, $blue2),
191
+ $alpha
192
+ );
193
+ } @else if($mode == reflex) {
194
+ @return rgba(
195
+ blend--screen($red1, $red2),
196
+ blend--screen($green1, $green2),
197
+ blend--screen($blue1, $blue2),
198
+ $alpha
199
+ );
200
+ } @else if($mode == linear-light) {
201
+ @return rgba(
202
+ blend--screen($red1, $red2),
203
+ blend--screen($green1, $green2),
204
+ blend--screen($blue1, $blue2),
205
+ $alpha
206
+ );
207
+ } @else if($mode == pin-light) {
208
+ @return rgba(
209
+ blend--screen($red1, $red2),
210
+ blend--screen($green1, $green2),
211
+ blend--screen($blue1, $blue2),
212
+ $alpha
213
+ );
214
+ } @else if($mode == vivid-light) {
215
+ @return rgba(
216
+ blend--screen($red1, $red2),
217
+ blend--screen($green1, $green2),
218
+ blend--screen($blue1, $blue2),
219
+ $alpha
220
+ );
221
+ } @else if($mode == hard-mix) {
222
+ @return rgba(
223
+ blend--screen($red1, $red2),
224
+ blend--screen($green1, $green2),
225
+ blend--screen($blue1, $blue2),
226
+ $alpha
227
+ );
228
+ } @else {
229
+ @return rgba(
230
+ $foreground-color,
231
+ $alpha
232
+ );
233
+ }
142
234
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-photoshop-gradient-overlay
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Hettler