@natec/mef-dev-ui-kit 20.1.21 → 20.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,688 +0,0 @@
1
- // Import the Compass Plugin
2
- //--------------------------------
3
- // Normal
4
- //--------------------------------
5
- @use "sass:math";
6
- @use "sass:color";
7
-
8
- @function blend-normal($foreground, $background) {
9
- $opacity: color.opacity($foreground);
10
- $background-opacity: color.opacity($background);
11
-
12
- // calculate opacity
13
- $bm-red: color.channel($foreground, "red", $space: rgb) * $opacity + color.channel($background, "red", $space: rgb) * $background-opacity * (1 - $opacity);
14
- $bm-green: color.channel($foreground, "green", $space: rgb) * $opacity + color.channel($background, "green", $space: rgb) * $background-opacity * (1 - $opacity);
15
- $bm-blue: color.channel($foreground, "blue", $space: rgb) * $opacity + color.channel($background, "blue", $space: rgb) * $background-opacity * (1 - $opacity);
16
- @return rgb($bm-red, $bm-green, $bm-blue);
17
- }
18
-
19
- //--------------------------------
20
- // Multiply
21
- //--------------------------------
22
- @function blend-multiply($foreground, $background) {
23
- $bm-red: math.div(color.channel($background, "red", $space: rgb) * color.channel($foreground, "red", $space: rgb), 255);
24
- $bm-green: math.div(color.channel($background, "green", $space: rgb) * color.channel($foreground, "green", $space: rgb), 255);
25
- $bm-blue: math.div(color.channel($background, "blue", $space: rgb) * color.channel($foreground, "blue", $space: rgb), 255);
26
-
27
- @return blend-normal(
28
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
29
- $background
30
- );
31
- }
32
-
33
- //--------------------------------
34
- // Lighten
35
- //--------------------------------
36
- @function blend-lighten($foreground, $background) {
37
- $bm-red: blend-lighten-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
38
- $bm-green: blend-lighten-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
39
- $bm-blue: blend-lighten-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
40
-
41
- @return blend-normal(
42
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
43
- $background
44
- );
45
- }
46
- @function blend-lighten-color($foreground, $background) {
47
- @if $background > $foreground {
48
- $foreground: $background;
49
- }
50
- @return $foreground;
51
- }
52
-
53
- //--------------------------------
54
- // Darken
55
- //--------------------------------
56
- @function blend-darken($foreground, $background) {
57
- $bm-red: blend-darken-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
58
- $bm-green: blend-darken-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
59
- $bm-blue: blend-darken-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
60
-
61
- @return blend-normal(
62
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
63
- $background
64
- );
65
- }
66
- @function blend-darken-color($foreground, $background) {
67
- @if $background < $foreground {
68
- $foreground: $background;
69
- }
70
- @return $foreground;
71
- }
72
-
73
- //--------------------------------
74
- // Darker Color
75
- //--------------------------------
76
- @function blend-darkercolor($foreground, $background) {
77
- $bm-red: color.channel($foreground, "red", $space: rgb);
78
- $bm-green: color.channel($foreground, "green", $space: rgb);
79
- $bm-blue: color.channel($foreground, "blue", $space: rgb);
80
- $background-red: color.channel($background, "red", $space: rgb);
81
- $background-green: color.channel($background, "green", $space: rgb);
82
- $background-blue: color.channel($background, "blue", $space: rgb);
83
-
84
- @if $background-red *
85
- 0.3 +
86
- $background-green *
87
- 0.59 +
88
- $background-blue *
89
- 0.11 <=
90
- $bm-red *
91
- 0.3 +
92
- $bm-green *
93
- 0.59 +
94
- $bm-blue *
95
- 0.11
96
- {
97
- $bm-red: $background-red;
98
- $bm-green: $background-green;
99
- $bm-blue: $background-blue;
100
- }
101
- @return blend-normal(
102
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
103
- $background
104
- );
105
- }
106
-
107
- //--------------------------------
108
- // Lighter Color
109
- //--------------------------------
110
- @function blend-lightercolor($foreground, $background) {
111
- $bm-red: color.channel($foreground, "red", $space: rgb);
112
- $bm-green: color.channel($foreground, "green", $space: rgb);
113
- $bm-blue: color.channel($foreground, "blue", $space: rgb);
114
- $background-red: color.channel($background, "red", $space: rgb);
115
- $background-green: color.channel($background, "green", $space: rgb);
116
- $background-blue: color.channel($background, "blue", $space: rgb);
117
-
118
- @if $background-red *
119
- 0.3 +
120
- $background-green *
121
- 0.59 +
122
- $background-blue *
123
- 0.11 >
124
- $bm-red *
125
- 0.3 +
126
- $bm-green *
127
- 0.59 +
128
- $bm-blue *
129
- 0.11
130
- {
131
- $bm-red: $background-red;
132
- $bm-green: $background-green;
133
- $bm-blue: $background-blue;
134
- }
135
- @return blend-normal(
136
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
137
- $background
138
- );
139
- }
140
-
141
- //--------------------------------
142
- // Linear Dodge
143
- //--------------------------------
144
- @function blend-lineardodge($foreground, $background) {
145
- $bm-red: blend-lineardodge-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
146
- $bm-green: blend-lineardodge-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
147
- $bm-blue: blend-lineardodge-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
148
-
149
- @return blend-normal(
150
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
151
- $background
152
- );
153
- }
154
- @function blend-lineardodge-color($foreground, $background) {
155
- @if $background + $foreground > 255 {
156
- $foreground: 255;
157
- } @else {
158
- $foreground: $background + $foreground;
159
- }
160
- @return $foreground;
161
- }
162
-
163
- //--------------------------------
164
- // Linear Burn
165
- //--------------------------------
166
- @function blend-linearburn($foreground, $background) {
167
- $bm-red: blend-linearburn-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
168
- $bm-green: blend-linearburn-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
169
- $bm-blue: blend-linearburn-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
170
-
171
- @return blend-normal(
172
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
173
- $background
174
- );
175
- }
176
- @function blend-linearburn-color($foreground, $background) {
177
- @if $background + $foreground < 255 {
178
- $foreground: 0;
179
- } @else {
180
- $foreground: $background + $foreground - 255;
181
- }
182
- @return $foreground;
183
- }
184
-
185
- //--------------------------------
186
- // Difference
187
- //--------------------------------
188
- @function blend-difference($foreground, $background) {
189
- $bm-red: abs(color.channel($background, "red", $space: rgb) - color.channel($foreground, "red", $space: rgb));
190
- $bm-green: abs(color.channel($background, "green", $space: rgb) - color.channel($foreground, "green", $space: rgb));
191
- $bm-blue: abs(color.channel($background, "blue", $space: rgb) - color.channel($foreground, "blue", $space: rgb));
192
-
193
- @return blend-normal(
194
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
195
- $background
196
- );
197
- }
198
-
199
- //--------------------------------
200
- // Screen
201
- //--------------------------------
202
- @function blend-screen($foreground, $background) {
203
- $bm-red: blend-screen-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
204
- $bm-green: blend-screen-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
205
- $bm-blue: blend-screen-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
206
-
207
- @return blend-normal(
208
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
209
- $background
210
- );
211
- }
212
- @function blend-screen-color($foreground, $background) {
213
- @return (255 - (((255 - $foreground) * (255 - $background)) / 256));
214
- }
215
-
216
- //--------------------------------
217
- // Exclusion
218
- //--------------------------------
219
- @function blend-exclusion($foreground, $background) {
220
- $bm-red: blend-exclusion-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
221
- $bm-green: blend-exclusion-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
222
- $bm-blue: blend-exclusion-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
223
-
224
- @return blend-normal(
225
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
226
- $background
227
- );
228
- }
229
- @function blend-exclusion-color($foreground, $background) {
230
- @return $background - ($background * (2 / 255) - 1) * $foreground;
231
- }
232
-
233
- //--------------------------------
234
- // Overlay
235
- //--------------------------------
236
- @function blend-overlay($foreground, $background) {
237
- $bm-red: blend-overlay-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
238
- $bm-green: blend-overlay-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
239
- $bm-blue: blend-overlay-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
240
-
241
- @return blend-normal(
242
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
243
- $background
244
- );
245
- }
246
- @function blend-overlay-color($foreground, $background) {
247
- @if $background <= math.div(255, 2) {
248
- $foreground: math.div(2 * $background * $foreground, 255);
249
- } @else {
250
- $foreground: 255 -
251
- (255 - 2 * ($background - math.div(255, 2))) *
252
- math.div(255 - $foreground, 255);
253
- }
254
- @return $foreground;
255
- }
256
-
257
- //--------------------------------
258
- // Soft Light
259
- //--------------------------------
260
- @function blend-softlight($foreground, $background) {
261
- $bm-red: blend-softlight-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
262
- $bm-green: blend-softlight-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
263
- $bm-blue: blend-softlight-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
264
-
265
- @return blend-normal(
266
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
267
- $background
268
- );
269
- }
270
- @function blend-softlight-color($foreground, $background) {
271
- @if $background < 128 {
272
- $foreground: ((math.div($foreground, 2)) + 64) * $background * math.div(2, 255);
273
- } @else {
274
- $foreground: 255 -
275
- (191 - (math.div($foreground, 2))) *
276
- (255 - $background) *
277
- math.div(2, 255);
278
- }
279
- @return $foreground;
280
- }
281
-
282
- //--------------------------------
283
- // Hard Light
284
- //--------------------------------
285
- @function blend-hardlight($foreground, $background) {
286
- $bm-red: blend-hardlight-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
287
- $bm-green: blend-hardlight-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
288
- $bm-blue: blend-hardlight-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
289
-
290
- @return blend-normal(
291
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
292
- $background
293
- );
294
- }
295
- @function blend-hardlight-color($foreground, $background) {
296
- $tmp-blend: $foreground;
297
- @if $tmp-blend < 128 {
298
- $foreground: $background * $tmp-blend * math.div(2, 255);
299
- } @else {
300
- $foreground: 255 - (255-$background) * (255-$tmp-blend) * math.div(2, 255);
301
- }
302
- @return $foreground;
303
- }
304
-
305
- //--------------------------------
306
- // Color Dodge
307
- //--------------------------------
308
- @function blend-colordodge($foreground, $background) {
309
- $bm-red: blend-colordodge-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
310
- $bm-green: blend-colordodge-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
311
- $bm-blue: blend-colordodge-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
312
-
313
- @return blend-normal(
314
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
315
- $background
316
- );
317
- }
318
- @function blend-colordodge-color($foreground, $background) {
319
- $tmp: $background * 256 / (255 - $foreground);
320
- @if $tmp > 255 or $foreground == 255 {
321
- $foreground: 255;
322
- } @else {
323
- $foreground: $tmp;
324
- }
325
- @return $foreground;
326
- }
327
-
328
- //--------------------------------
329
- // Color Burn
330
- //--------------------------------
331
- @function blend-colorburn($foreground, $background) {
332
- $bm-red: blend-colorburn-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
333
- $bm-green: blend-colorburn-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
334
- $bm-blue: blend-colorburn-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
335
-
336
- @return blend-normal(
337
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
338
- $background
339
- );
340
- }
341
- @function blend-colorburn-color($foreground, $background) {
342
- $tmp: (255 - ((255 - $background) * 255) / $foreground);
343
- }
344
-
345
- //--------------------------------
346
- // Linear Light
347
- //--------------------------------
348
- @function blend-linearlight($foreground, $background) {
349
- $bm-red: blend-linearlight-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
350
- $bm-green: blend-linearlight-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
351
- $bm-blue: blend-linearlight-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
352
-
353
- @return blend-normal(
354
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
355
- $background
356
- );
357
- }
358
- @function blend-linearlight-color($foreground, $background) {
359
- @if $foreground < 128 {
360
- $foreground: blend-linearburn-color($background, 2 * $foreground);
361
- } @else {
362
- $foreground: blend-lineardodge-color($background, 2 * ($foreground - 128));
363
- }
364
- @return $foreground;
365
- }
366
-
367
- //--------------------------------
368
- // Vivid Light
369
- //--------------------------------
370
- @function blend-vividlight($foreground, $background) {
371
- $bm-red: blend-vividlight-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
372
- $bm-green: blend-vividlight-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
373
- $bm-blue: blend-vividlight-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
374
-
375
- @return blend-normal(
376
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
377
- $background
378
- );
379
- }
380
-
381
- @function blend-vividlight-color($foreground, $background) {
382
- @if $foreground < 128 {
383
- $foreground: blend-colorburn-color(2 * $foreground, $background);
384
- } @else {
385
- $foreground: blend-colordodge-color(2 * ($foreground - 128), $background);
386
- }
387
- @return $foreground;
388
- }
389
-
390
- //--------------------------------
391
- // Pin Light
392
- //--------------------------------
393
- @function blend-pinlight($foreground, $background) {
394
- $bm-red: blend-pinlight-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
395
- $bm-green: blend-pinlight-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
396
- $bm-blue: blend-pinlight-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
397
-
398
- @return blend-normal(
399
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
400
- $background
401
- );
402
- }
403
-
404
- @function blend-pinlight-color($foreground, $background) {
405
- @if $foreground < 128 {
406
- $foreground: blend-darken-color($background, 2 * $foreground);
407
- } @else {
408
- $foreground: blend-lighten-color($background, 2 * ($foreground - 128));
409
- }
410
- @return $foreground;
411
- }
412
-
413
- //--------------------------------
414
- // Hard Mix
415
- //--------------------------------
416
- @function blend-hardmix($foreground, $background) {
417
- $bm-red: blend-hardmix-color(color.channel($foreground, "red", $space: rgb), color.channel($background, "red", $space: rgb));
418
- $bm-green: blend-hardmix-color(color.channel($foreground, "green", $space: rgb), color.channel($background, "green", $space: rgb));
419
- $bm-blue: blend-hardmix-color(color.channel($foreground, "blue", $space: rgb), color.channel($background, "blue", $space: rgb));
420
-
421
- @return blend-normal(
422
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
423
- $background
424
- );
425
- }
426
-
427
- @function blend-hardmix-color($foreground, $background) {
428
- $tmp: blend-vividlight-color($foreground, $background);
429
- @if $tmp < 128 {
430
- $foreground: 0;
431
- } @else {
432
- $foreground: 255;
433
- }
434
- @return $foreground;
435
- }
436
-
437
- // Unique to Photoshop
438
-
439
- //--------------------------------
440
- // Color Blend
441
- //--------------------------------
442
- @function blend-colorblend($foreground, $background) {
443
- $foreground-hsv: color-to-hsv($foreground);
444
- $background-hsv: color-to-hsv($background);
445
-
446
- $bm-hsv: nth($foreground-hsv, 1), nth($foreground-hsv, 2),
447
- nth($background-hsv, 3);
448
- $bm-color: hsv-to-color($bm-hsv);
449
-
450
- @return blend-normal(
451
- rgba(
452
- color.channel($bm-color, "red", $space: rgb),
453
- color.channel($bm-color, "green", $space: rgb),
454
- color.channel($bm-color, "blue", $space: rgb),
455
- color.opacity($foreground)
456
- ),
457
- $background
458
- );
459
- }
460
-
461
- //--------------------------------
462
- // Dissolve
463
- //--------------------------------
464
- @function blend-dissolve($foreground, $background) {
465
- // The Dissolve blend mode acts on transparent and partially transparent pixels
466
- // it treats transparency as a pixel pattern and applies a diffusion dither pattern.
467
- // @see http://photoblogstop.com/photoshop/photoshop-blend-modes-explained
468
- @return $foreground;
469
- }
470
-
471
- //--------------------------------
472
- // Divide
473
- //--------------------------------
474
- @function blend-divide($foreground, $background) {
475
- $bm-red: blend-divide-colors(color.red($foreground), color.red($background));
476
- $bm-green: blend-divide-colors(color.green($foreground), color.green($background));
477
- $bm-blue: blend-divide-colors(color.blue($foreground), color.blue($background));
478
-
479
- @return blend-normal(
480
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
481
- $background
482
- );
483
- }
484
- @function blend-divide-colors($foreground, $background) {
485
- @return min((($background / 255) / ($foreground / 255)) * 255, 255);
486
- }
487
-
488
- //--------------------------------
489
- // Hue
490
- //--------------------------------
491
- @function blend-hue($foreground, $background) {
492
- $foreground-hsv: color-to-hsv($foreground);
493
- $background-hsv: color-to-hsv($background);
494
-
495
- $bm-hsv: nth($foreground-hsv, 1), nth($background-hsv, 2),
496
- nth($background-hsv, 3);
497
- $bm-color: hsv-to-color($bm-hsv);
498
-
499
- @return blend-normal(
500
- rgba(
501
- color.channel($bm-color, "red", $space: rgb),
502
- color.channel($bm-color, "green", $space: rgb),
503
- color.channel($bm-color, "blue", $space: rgb),
504
- color.opacity($foreground)
505
- ),
506
- $background
507
- );
508
- }
509
-
510
- //--------------------------------
511
- // Luminosity
512
- //--------------------------------
513
- @function blend-luminosity($foreground, $background) {
514
- $foreground-hsv: color-to-hsv($foreground);
515
- $background-hsv: color-to-hsv($background);
516
-
517
- $bm-hsv: nth($background-hsv, 1), nth($background-hsv, 2),
518
- nth($foreground-hsv, 3);
519
- $bm-color: hsv-to-color($bm-hsv);
520
-
521
- @return blend-normal(
522
- rgba(
523
- color.channel($bm-color, "red", $space: rgb),
524
- color.channel($bm-color, "green", $space: rgb),
525
- color.channel($bm-color, "blue", $space: rgb),
526
- color.opacity($foreground)
527
- ),
528
- $background
529
- );
530
- }
531
-
532
- //--------------------------------
533
- // Saturation
534
- //--------------------------------
535
- @function blend-saturation($foreground, $background) {
536
- $foreground-hsv: color-to-hsv($foreground);
537
- $background-hsv: color-to-hsv($background);
538
-
539
- $bm-hsv: nth($background-hsv, 1), nth($foreground-hsv, 2),
540
- nth($background-hsv, 3);
541
- $bm-color: hsv-to-color($bm-hsv);
542
-
543
- @return blend-normal(
544
- rgba(
545
- color.channel($bm-color, "red", $space: rgb),
546
- color.channel($bm-color, "green", $space: rgb),
547
- color.channel($bm-color, "blue", $space: rgb),
548
- color.opacity($foreground)
549
- ),
550
- $background
551
- );
552
- }
553
-
554
- //--------------------------------
555
- // Subtract
556
- //--------------------------------
557
- @function blend-subtract($foreground, $background) {
558
- $bm-red: max(color.channel($background, "red", $space: rgb) - color.channel($foreground, "red", $space: rgb), 0);
559
- $bm-green: max(color.channel($background, "green", $space: rgb) - color.channel($foreground, "green", $space: rgb), 0);
560
- $bm-blue: max(color.channel($background, "blue", $space: rgb) - color.channel($foreground, "blue", $space: rgb), 0);
561
-
562
- @return blend-normal(
563
- rgba($bm-red, $bm-green, $bm-blue, color.opacity($foreground)),
564
- $background
565
- );
566
- }
567
-
568
- //--------------------------------
569
- // HSL and HSV
570
- //--------------------------------
571
- // @see https://gist.github.com/1069204
572
- @function hsv-to-hsl($h, $s: 0, $v: 0) {
573
- @if type-of($h) == "list" {
574
- $v: nth($h, 3);
575
- $s: nth($h, 2);
576
- $h: nth($h, 1);
577
- }
578
-
579
- @if unit($h) == "deg" {
580
- $h: 3.1415 * 2 * ($h / 360deg);
581
- }
582
- @if unit($s) == "%" {
583
- $s: 0 + ($s / 100%);
584
- }
585
- @if unit($v) == "%" {
586
- $v: 0 + ($v / 100%);
587
- }
588
-
589
- $ss: $s * $v;
590
- $ll: (2 - $s) * $v;
591
-
592
- @if $ll <= 1 and $ll != 0 {
593
- $ss: $ss / $ll;
594
- } @else if ($ll == 2) {
595
- $ss: 0;
596
- } @else {
597
- $ss: $ss / (2 - $ll);
598
- }
599
-
600
- $ll: $ll / 2;
601
-
602
- @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $ss))),
603
- percentage(max(0, min(1, $ll)));
604
- }
605
-
606
- @function hsl-to-hsv($h, $ss: 0, $ll: 0) {
607
- @if type-of($h) == "list" {
608
- $ll: nth($h, 3);
609
- $ss: nth($h, 2);
610
- $h: nth($h, 1);
611
- } @else if type-of($h) == "color" {
612
- $ll: lightness($h);
613
- $ss: saturation($h);
614
- $h: hue($h);
615
- }
616
-
617
- @if unit($h) == "deg" {
618
- $h: 3.1415 * 2 * ($h / 360deg);
619
- }
620
- @if unit($ss) == "%" {
621
- $ss: 0 + ($ss / 100%);
622
- }
623
- @if unit($ll) == "%" {
624
- $ll: 0 + ($ll / 100%);
625
- }
626
-
627
- $ll: $ll * 2;
628
-
629
- @if $ll <= 1 {
630
- $ss: $ss * $ll;
631
- } @else {
632
- $ss: $ss * (2 - $ll);
633
- }
634
-
635
- $v: ($ll + $ss) / 2;
636
- $s: if($ll + $ss == 0, 0, (2 * $ss) / ($ll + $ss));
637
-
638
- @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $s))),
639
- percentage(max(0, min(1, $v)));
640
- }
641
-
642
- @function color-to-hsv($color) {
643
- @return hsl-to-hsv($color);
644
- }
645
-
646
- @function hsv-to-color($h, $s: 0, $v: 0) {
647
- $hsl: hsv-to-hsl($h, $s, $v);
648
- @return hsl(nth($hsl, 1), nth($hsl, 2), nth($hsl, 3));
649
- }
650
-
651
- @function fade($color, $opacity) {
652
- @return fade-in($color, calc($opacity / 100%));
653
- }
654
-
655
- div.jqxInGridLink {
656
- cursor: pointer;
657
- color: blue;
658
- margin: 2px;
659
- text-decoration: underline;
660
- :hover {
661
- color: blueviolet;
662
- }
663
- }
664
-
665
- .pink-text {
666
- color: pink !important;
667
- }
668
-
669
- .red-text {
670
- color: red !important;
671
- }
672
-
673
- .turquoise-text {
674
- color: rgb(3, 167, 150) !important;
675
- }
676
-
677
- .blue-text {
678
- color: blue !important;
679
- }
680
- // :visited {
681
- // color: green;
682
- // }
683
- // :hover {
684
- // background: yellow;
685
- // }
686
- // :visited:hover {
687
- // color: purple;
688
- // }