PDA

View Full Version : dynamic color issue



a.script-2.0
March 15th, 2005, 06:25 PM
i was talking to someone @ my school about dynamic scripter color fades? he showed me an example of his script and it referenced color a value of 9126315
i asked what that was and he said he's using hex color and rgb? anyone know anything about these? im kinda familiar with the other values 0xFFFFFF and #8C2C0B but im clueless as to this one? any takers?

frost_oni
March 15th, 2005, 06:30 PM
yeah.

red = 23;
green = 123;
blue = 190;

colour = (Math.round( red <<16 | green < 8 | blue);

then use setRGB(colour);

it's something like that i think. i'll take a look when i get back home.

a.script-2.0
March 15th, 2005, 06:39 PM
but how can you identify those numbers to colors visually? like say i wanted a royal blue? is there a way to make create a # for it?
thanks for the prompt response

a.script-2.0
March 16th, 2005, 10:45 AM
:q:

frost_oni
March 16th, 2005, 10:59 AM
i'll look into it when i finish my java coursework. that is when the holidays come....