ID:1842660
 
(See the best response by Mr_Goober.)
Code:


Problem description: It says you can use colours, but in what format will it take a colour. I tried various ways... well besides the name of the colour maybe that is it. But than how would you change the alpha? I wouldnt mind some examples too thank you

Best response
All colors are in hex format. That is #rrggbb. atom.color will change the actual color (as a hex value) and atom.alpha will change its opacity (range of 0 to 255).

In regards to hex values, each component is a value 0 to 255 (00 to ff in hex). White would be #ffffff and black would be #000000. All color is composed of red, green, and blue light, hence the #rrggbb format.

To change the color of an atom in animate (), use the "color" named argument.
animate(the_atom, color = "#ffffff", time = 10)


edit: BYOND comes equipped with a handy rgb() function which takes numerical values and spits out a hex code for you.
rgb(255,0,0) // result is red
There are also a bunch of colours you can use as a text string.

color = "white" // white
color = "red" // red
color = "green" // green


color = "#F0F0F0" // my personal favorite ;)
color = "#FFFFFF" // white
color = "#FF0000" // red
color = "#00FF00" // green

color = rgb(255, 255, 255) // white
color = rgb(255, 0, 0) // red
color = rgb(0, 255, 0) // green


So there's a few examples of three ways you can go about doing the same thing. To use this with animate, you just use the animate() proc as Mr_Goober mentioned above.
You can also include the alpha in rgb() as the fourth argument, for atom.color. It'll override changes to atom.alpha.
To use it in rgb() the syntax would be
rgb(red, green, blue, alpha) all arguments being a number from 0 - 255.

That would look like

animate(icon, color = rgb(255, 255, 255, 128) // white (no color change to the icon), with half alpha (half-see-through)


Or you can set the alpha as an argument in animate()

animate(icon, color = rgb(255, 255, 255), alpha = 128) // The same as above.

// Or any of the other two ways I showed to set atom.color

Hold A to charge your laser (lol).
okay thanks to all of you that really helped me out.