I was wondering if there was a way to change the color of an SKSpriteNode programmatically?? Say I have a texture for an SKSpriteNode that is a box that has a black outline and a white fill color. How would I be able to change the white fill color to a different color programmatically?? (I was thinking maybe a custom method that searched a texture for white pixels and then replace the pixels with a different color) I don't even know if this is possible.
Asked
Active
Viewed 211 times
1 Answers
0
You can set a color to SKSpriteNode
and then use colorBlendFactor
, here is an example:
image.color = [UIColor greenColor];
image.colorBlendFactor = 0.5;

aramusss
- 2,391
- 20
- 30