Jump to content
GreenSock

krieg93

JS Color Picker and Tweenmax

Recommended Posts

Tweenmax team:

 

First of all, amazing js, I just love it.

 

I need help with a code that I'm actually working, it's just a Color picker that changes background colors with a bar with no position (an sliding bar), and this bar just changes the background color with hex codes.

 

I need to know if there's a way with Tweenmax to do a smooth transition of the background with the new hexcodes.

 

Thanks in advance, and sorry for my english, It's not my mother language.

 

Regards!

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

Yes, TweenMax can do a smooth color transition.

TweenMax.to("#redBox", 2, {backgroundColor:"#ff00ff"})
TweenMax.to("#blueBox", 2, {backgroundColor:0xff00ff})


//or rgb(), rgba(), hsl(), hsla()

http://codepen.io/GreenSock/pen/dPzKyJ?editors=001

 

Let us know if that works for you.

 

ps. you posted in the Flash forums initially but I moved you into the JS / HTML5 world.

  • Like 2
Link to comment
Share on other sites

Works like a charm!, really appreciated ^_^.

 

Thanks!, and sorry for the wrong posted 8(.

 

regards!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×