Closed francescoagati closed 9 years ago
Interesting idea. Why not adding combineColors
directly to Rgba
and Rgbxa
?
If we add combineColors
your use case would become:
color.withAlpha(0.5).combineColor(otherColor); // changed `combineColors` to `combineColor`
and with combineColor i can after convert rgba to normal rgb?
2015-07-13 17:09 GMT+02:00 Franco Ponticelli notifications@github.com:
If we add combineColors your use case would become:
color.withAlpha(0.5).combineColor(otherColor); // changed
combineColors
tocombineColor
— Reply to this email directly or view it on GitHub https://github.com/fponticelli/thx.color/issues/25#issuecomment-120961974 .
You can always do that (implicitly or through .toRgb
) but since the alpha info is lost in combineColor
I guess the output should be directly Rgb
or Rgbx
. I can add this later today or I will be glad to accept a PR.
ok i prepare a pull request
2015-07-13 17:15 GMT+02:00 Franco Ponticelli notifications@github.com:
You can always do that (implicitly or through .toRgb) but since the alpha info is lost in combineColor I guess the output should be directly Rgb or Rgbx. I can add this later today or I will be glad to accept a PR.
— Reply to this email directly or view it on GitHub https://github.com/fponticelli/thx.color/issues/25#issuecomment-120963265 .
;)
Implemented, thank you for the suggestion.
:+1:
based on http://yolijn.com/convert-rgba-to-rgb