Jump to content
Search Community

JS Color Picker and Tweenmax

krieg93 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

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.



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()



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

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.
  • Create New...