Reputation: 12828
Is there an easy way to grey out a sprite? I'm disabling a button, and I know how to do that, but wants to convey that in the GUI.
Upvotes: 4
Views: 1256
Reputation: 73395
You can apply the ColorMatrixFilter to your Sprite with the approximate values that makes color greyscaled.
sprite.filters = [ new ColorMatrixFilter([0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0.3086, 0.6094, 0.0820, 0, 0, 0, 0, 0, 1, 0]) ];
Upvotes: 7