Re: converting (Neil's) rgb formt
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET> Oct 10, 1999
- 425 views
but what should I do here: neilrgb=6579300 rgb = repeat(neilrgb, 3) rgb[1] = floor(rgb[1]/65536) rgb[3] = remainder(rgb[3], 256) rgb[2] = (remainder(rgb[3], 65536) - rgb[3]) / 256 That is one way. You should be able to devise another 5 by now. :) 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 1:27 PM Subject: 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: converting (Neil's) rgb formt > -------------------------------------------------------------------------- ----- > > I now have texture mapping somewhat done, but I'd need to load 24-bit = > images for testing purposes. > I use Neil for this, but how may I change the neil's #RRGGBB format into = > mine {#RR,#GG,#BB} > > backwards it goes like this: > rgb= {100,100,100} > neilrgb= rgb[1]*65536+rgb[2]*256+rgb[3] > > but what should I do here: > neilrgb=6579300 > rgb= ????? > > --Talvitie >