--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> --- In [email protected], Carroll Robbins <carrollrobbins@>
> wrote:
> >
> > On Sat, 13 Dec 2008 17:11:33 -0000, "Sheri" <sherip99@> wrote:
> > 
> > >Do you know how to compute the r g b values?
> > 
> > local r,g,b,rgb
> > rgb = inputcolor
> > r = rgb % 256
> > g = rgb / 256 % 256
> > b = rgb / 65536 % 256
> > win.debug("rgb = ",rgb," r g b = ",r,g,b)
> > quit
> > -- 
> > Carroll Robbins
> >
> or you can use bit shirts and and (just to show the operators are in
> powerpro)
> 
> r = rgb & 0xff
> g = rgb>>8 & 0xff
> b = rgb>>16 & 0xff
> win.debug("rgb = ",rgb," r g b = ",r,g,b)
>

So what's the notation to go the other way? Is there something niftier
than this:

rgb = r+(256*(g+256*b))

?

Regards,
Sheri


Reply via email to