Thanks very much for your response Martin but I don't understand it. I don't
have three vars called R G and B. I just have a number which was retuned
from getPixel. Am I being stupid? I can't see how I should  do what you
sugest. Pease explain a little further.

James

On 7/29/06, Martin Wood <[EMAIL PROTECTED]> wrote:

to go from a 24 bit number to 3x8 bit colour components you can just shift
it
and mask the bits you need :

var r=color >> 16 & 0xFF
var g=color >> 8 & 0xFF
var b=color & 0xFF

that should do the job.

James Deakin wrote:
> Hi Guys,
>
> I'm having some problems with getting the brightness of a color returned
> from get pixel. get pixel returns an RGB color as a number which means I
> was
> expecting something like three groups of three numbers 255 255 255 or
> similar. what I am actually getting back is of this form 14540754 one
digit
> short.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to