Skip to content

setColor() on UIScale9Sprite applies wrong color #3383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ntrrgc opened this issue Sep 30, 2016 · 2 comments
Open

setColor() on UIScale9Sprite applies wrong color #3383

ntrrgc opened this issue Sep 30, 2016 · 2 comments

Comments

@ntrrgc
Copy link
Contributor

ntrrgc commented Sep 30, 2016

The following screenshot shows both a CCSprite and a Scale9Sprite with the same texture. Both were applied setColor() with the same color (#EFFCAA) but they are displayed in very different colors.

It looks like the color multiplication is being applied twice instead of once in Scale9Sprite case..

@ntrrgc
Copy link
Contributor Author

ntrrgc commented Sep 30, 2016

Actually after comparing colors with the same operation in Gimp I found it looks more like it's applied three times.

ntrrgc added a commit to ntrrgc/cocos2d-html5 that referenced this issue Oct 3, 2016
@pandamicro
Copy link
Contributor

pandamicro commented Dec 6, 2016

Hi, thanks for the contribution, but as we have rewritten ccui.Scale9Sprite in an internal branch, I think it won't be needed anymore.

The new ccui.Scale9Sprite is adapted from the version in Cocos Creator, which contains only data instead of using internal sprites.

I will send a pull request this week to let you guys have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants