obf 0.6.8 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinycolor_convert.js +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e5ddf2d4ec5f833258871d33b9c65c5bc7f59f
|
4
|
+
data.tar.gz: 83beff45b47d4e162c98f3206cef1ec5acdb3987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f46828444ffc612eb1c47421de17099ec0e9375bb769858e3395a77545f01e5e9a7387829639a266260dae1fa5adfb75c3489057d23893a29d344b272e69ad
|
7
|
+
data.tar.gz: ef488f0dad223baef6e063ec795ddd1793e19eab6e19b307e907d60678a983856d997c6fd691aaedf09dbd433d431554c402ea1a4f45b421192dbb6c3f678042
|
data/lib/tinycolor_convert.js
CHANGED
@@ -1122,8 +1122,13 @@ if(process.argv[3] == 'rgb') {
|
|
1122
1122
|
console.log(color.toRgbString());
|
1123
1123
|
} else {
|
1124
1124
|
if(color.getAlpha() < 1.0) {
|
1125
|
-
var
|
1126
|
-
|
1125
|
+
var rgb = color.toRgb();
|
1126
|
+
var alpha_factor = 1.0 - color.getAlpha();
|
1127
|
+
var newrgb = {};
|
1128
|
+
newrgb.r = rgb.r + ((255 - rgb.r) * alpha_factor);
|
1129
|
+
newrgb.g = rgb.g + ((255 - rgb.g) * alpha_factor);
|
1130
|
+
newrgb.b = rgb.b + ((255 - rgb.b) * alpha_factor);
|
1131
|
+
color = tiny(newrgb);
|
1127
1132
|
}
|
1128
1133
|
console.log(color.toHex());
|
1129
1134
|
}
|