Skip to content

Commit

Permalink
Update Color
Browse files Browse the repository at this point in the history
  • Loading branch information
avanes committed Jun 7, 2017
1 parent 5ccfed1 commit a4fde3a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ var parser = function(string, matcher, matcher2, callback) {

var transformRgbRgbAlpha = function(string) {
return parser(string, RGBA_RGB_RE, RGBA_RGB_RE, function(matches){
return color(matches[1]).alpha(matches[2]).rgbaString();
return color(matches[1]).alpha(matches[2]).toString();
});
};

var transformRgbAlpha = function(string) {
return parser(string, RGBA_RE, RGBA_RE, function(matches) {
return color('#'+matches[1])
.alpha(parseAlpha(matches[2]))
.rgbaString();
.toString();
});
};

Expand All @@ -94,7 +94,7 @@ var transformHexAlpha = function(string) {

return color('#' + rgbHex)
.alpha(alpha)
.rgbaString();
.toString();
});
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/avanes/postcss-color-alpha.git"
},
"dependencies": {
"color": "^0.10.1",
"color": "^1.0.3",
"postcss": "^5.0.8",
"postcss-message-helpers": "^2.0.0"
},
Expand Down
51 changes: 27 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -210,26 +210,29 @@ code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"

color-convert@^0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd"
color-convert@^1.8.2:
version "1.9.0"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
dependencies:
color-name "^1.1.1"

color-name@^1.0.0:
color-name@^1.0.0, color-name@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d"

color-string@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
color-string@^1.4.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.2.tgz#26e45814bc3c9a7cbd6751648a41434514a773a9"
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"

color@^0.10.1:
version "0.10.1"
resolved "https://registry.yarnpkg.com/color/-/color-0.10.1.tgz#c04188df82a209ddebccecdacd3ec320f193739f"
color@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/color/-/color-1.0.3.tgz#e48e832d85f14ef694fb468811c2d5cfe729b55d"
dependencies:
color-convert "^0.5.3"
color-string "^0.3.0"
color-convert "^1.8.2"
color-string "^1.4.0"

combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
Expand Down Expand Up @@ -387,14 +390,10 @@ entities@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"

[email protected]:
[email protected], escape-string-regexp@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1"

escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

[email protected], [email protected]:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
Expand Down Expand Up @@ -883,6 +882,10 @@ is-absolute@^0.2.3:
is-relative "^0.2.1"
is-windows "^0.2.0"

is-arrayish@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.1.tgz#c2dfc386abaa0c3e33c48db3fe87059e69065efd"

is-binary-path@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898"
Expand Down Expand Up @@ -1391,13 +1394,7 @@ object.omit@^2.0.0:
for-own "^0.1.4"
is-extendable "^0.1.1"

once@^1.3.0, once@^1.3.3:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"

once@~1.3.0:
once@^1.3.0, once@^1.3.3, once@~1.3.0:
version "1.3.3"
resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
dependencies:
Expand Down Expand Up @@ -1715,6 +1712,12 @@ signal-exit@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"

simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
dependencies:
is-arrayish "^0.3.1"

slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
Expand Down

0 comments on commit a4fde3a

Please sign in to comment.