AW: Know RGB from color index

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AW: Know RGB from color index

Emil Tchekov-3
I was searching in my files - here is one more way (PLUA 1) to extract the rgb - values



function GetRGB(var)

    local qr, qg, qb

    qr=floor(var/65536)

    qg=floor((var-qr*65536)/256)

    qb=var-qr*65536-qg*256

    return qr,qg,qb

end


very best regards

Emil





----- Ursprüngliche Mail ----
Von: ibelcomputing <[hidden email]>
An: [hidden email]
Gesendet: Mittwoch, den 6. August 2008, 18:52:47 Uhr
Betreff: [plua] Know RGB from color index

My question is, exactly as title says, is there any way to know the R,
G and B values of a color given its index?


------------------------------------

Yahoo! Groups Links



__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com 
Reply | Threaded
Open this post in threaded view
|

Re: Know RGB from color index

Bugzilla from ibelcomputing@yahoo.com.mx
--- In [hidden email], Emil Tchekov <etchekov@...> wrote:

Thank you very much for your help, from technical to comprehensive
info - even a plua 1 solution, what i've looking for! Thanks again.

And in the function i see "return"... Is useful to know that... So i
can assign the function like any other? I've programmed for some years
in plua 1, since plua 1.0, and i didn't know about the return
clause... Hoh!

>
> I was searching in my files - here is one more way (PLUA 1) to
extract the rgb - values

>
>
>
> function GetRGB(var)
>
>     local qr, qg, qb
>
>     qr=floor(var/65536)
>
>     qg=floor((var-qr*65536)/256)
>
>     qb=var-qr*65536-qg*256
>
>     return qr,qg,qb
>
> end
>
>
> very best regards
>
> Emil
>
________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden
Schutz gegen Massenmails.
> http://mail.yahoo.com
>