PDA

View Full Version : hard-coded rgb values


cheez
12-27-2002, 03:55 AM
Does anyone have a text file with a bunch ( > 100 && < 1000) of hardcoded rgb value (referably "colorful" rather than b&w ;) ). I plan on using them in an array where random values are chosen. I can make my own, and have so far, but it's only 10 values long :( Looking for a shortcut!

Thanks,
Cheez

Esquared
12-28-2002, 07:12 PM
If you truly want a random color, why not write a short script to generate one. The following will randomly set the color of an object when it is loaded, but could be implemented in other handlers of course.

onClipEvent(load)
{
myColor = new Color(this)
myTransform = new Object()
myTransform.ra = random(200)-100
myTransform.rb = random(255)
myTransform.ga = random(200)-100
myTransform.gb = random(255)
myTransform.ba = random(200)-100
myTransform.bb = random(255)
myColor.setTransform(myTransform)
}

farafiro
12-29-2002, 08:26 AM
I like this one
http://www.flashmxfiles.com/phpBB2/viewtopic.php?t=591&highlight=color+colour

cheez
12-30-2002, 05:17 AM
Wow, thanks everyone. I decided to go ahead an make my own tool for looking at color/hexadecimal association. I wanted to make a hard list of values that were within a few subtle shades of each other up and down. I'm going to post in the site check to see if it would be of a broader interest (although the code referenced here is quite nice ;)).

http://www.netwiz.net/~cheez/hexanalyzer.html

zip'd *.fla
http://www.netwiz.net/~cheez/hexanalyzer.ZIP

Thanks,
Cheez

Originally posted by farafiro
I like this one
http://www.flashmxfiles.com/phpBB2/viewtopic.php?t=591&highlight=color+colour