Re: converting (Neil's) rgb formt
Actually I got the 3rd and 2nd reversed. It should be as below.
The green and blue would have been mixed up. :(
rgb[1] = floor(rgb[1]/65536)
rgb[2] = remainder(rgb[2], 256)
rgb[3] = (remainder(rgb[3], 65536) - rgb[2]) / 256
Lucius L. Hilley III
lhilley at cdc.net lucius at ComputerCafeUSA.com
+----------+--------------+--------------+----------+
| Hollow | ICQ: 9638898 | AIM: LLHIII | Computer |
| Horse +--------------+--------------+ Cafe' |
| Software | http://www.cdc.net/~lhilley | USA |
+----------+-------+---------------------+----------+
| http://www.ComputerCafeUSA.com |
+--------------------------------+
----- Original Message -----
From: Talvitie <smtoa at SAUNALAHTI.FI>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, October 10, 1999 3:45 PM
Subject: Re: converting (Neil's) rgb formt
> ---------------------- Information from the mail
header -----------------------
> Sender: Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> Poster: Talvitie <smtoa at SAUNALAHTI.FI>
> Subject: Re: converting (Neil's) rgb formt
> --------------------------------------------------------------------------
-----
>
> Lucius L. Hilley III wrote:
> > neilrgb=3D6579300
> > rgb =3D repeat(neilrgb, 3)
> > rgb[1] =3D floor(rgb[1]/65536)
> > rgb[3] =3D remainder(rgb[3], 256)
> > rgb[2] =3D (remainder(rgb[3], 65536) - rgb[3]) / 256
>
>
> Thanks :)
> btw, there's a little error in the last line. It should go like this:
> rgb[2] =3D (remainder(rgb[2], 65536) - rgb[3]) / 256
>
> --Talvitie
>
|
Not Categorized, Please Help
|
|