redon77 Posted January 9, 2010 Share Posted January 9, 2010 Hallo I like tweenmax very much and use it a lot for all kind of tweenings. Now I have a problem and can't find a solution. Is there a way to get inverse colors with tweenmax? If an object is white it would be black afterwards, if it is red it would be some kind of green etc. Any other ideas than using tweenmax? Thank you Link to comment Share on other sites More sharing options...
GreenSock Posted January 9, 2010 Share Posted January 9, 2010 No, a tweening engine isn't meant to do things like find inverse colors for you. I'm not positive this would work perfectly for you, but if I were you, I'd try separating the parts of the hex color into their red, green, and blue values (each of which will be an integer between 0 and 255) and then you get the inverse of each one (255 - currentValue) and recombine them into a hex color. Hope that helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now