954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Specifying colours

I am using the script below which generates random colours for the background of an image. However, what I would really like to do is limit the colours to a specific range. Can anyone help?
The script is here...
http://buildinternet.com/live/rainbow/

HelenLF
Junior Poster
111 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

According to the tutorial page associated with that script you control what you want in the following line of code:

( { backgroundColor: hue }, 1000)


Change the value from 1000 to another number and it will change the range. However...it doesn't give specific values to use for a specific range that you want to keep limited to. It'd take some time but the best I can suggest is keep changing the value and refreshing and see how close you can get to what you want.

I know that the rest of the code in the tutorial makes JQuery use random color hues and basically you want to change it from being random to changing between set color values I believe. The JQuery site is currently no help in those regards. Apparently JQuery's animate functions allow one to specify RGB, HEX and color names. The tutorial page you linked to is using RGB values and randomizing it. But the official site for JQuery is missing info on the page which is supposed to further explain how to specify colors used in the 'animate' process.

weekendrockstar
Junior Poster in Training
71 posts since Dec 2010
Reputation Points: 25
Solved Threads: 16
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: