Saturday 25 September 2010

Javascript Color Looping

If you find yourself looping thru JS code to tweak the color settings:

// Sets myColor to be the Hex AA + a sample integer
var myColor= 0xAA + parseInt(20)

// toString(16) turns a decimal int into a Hex value.
var colorToUse = myColor.toString(16)

No comments:

Post a Comment