Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
alexprokop

Consider adding CSS Color Name lookup to CSS plugin?

Recommended Posts

Recently I found a background color animation was failing in IE8, this was because I was reading the color to tween to from a hidden div and IE8 was returning the value as 'whitesmoke'. It's easy enough to use a lookup table as here:

 

http://stackoverflow.com/questions/1573053/javascript-function-to-convert-color-names-to-hex-codes

 

But might be nice if this was handled internally by the CSS plugin.

Link to comment
Share on other sites

We actually do have a color lookup in CSSPlugin, but it only covers the most common/standard ones in order to conserve file size. Apparently not all browsers support the exhaustive list, so we focused on the common ones that all browsers understand:

  • aqua
  • lime
  • silver
  • black
  • maroon
  • teal
  • blue
  • navy
  • white
  • fuchsia
  • olive
  • yellow
  • orange
  • gray
  • purple
  • green
  • red
  • pink
  • cyan
  • transparent
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.
×