🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #1249

Re: Mac II Palettes

#1249
From: Chris Plummer
Date: Wed, 12 Jul 1989 01:37
20 lines
1203 bytes
In article <635@sys.uea.ac.uk> swc@uea-sys.UUCP () writes:
>
>The RGB colour entries in Mac II's palettes are supposed to be 0 - 65535
>but when converted to the conventional range 0 .. 1  by:
>
>	newcol.red := col.red/65535  etc
>
>where newcol.red, green and blue are reals, it starts inserting negative
>numbers (possibly -32767 to 32767 or something similar).
>
>Can anybody think of a suitable assignment for going from the integers
>to the reals (and vice versa) apart from adding and subtracting 32767 etc.

According to IM V-136, the RGBColor record consists of 3 INTEGERs and
INTEGERs are signed (-32768..32767) so it looks like you'll need to
add 32768 to the color values or treat them as unsigned integers (maybe
declare a type called UNSIGNEDINT : 0..65535 and then use this as
a type cast.   Hope this helps.

			--Chris Plummer
Technical Details
Message-ID: <33060@apple.Apple.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!cjp
References: <635@sys.uea.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!cjp
From: cjp@Apple.COM (Chris Plummer)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: Re: Mac II Palettes
Message-ID: <33060@apple.Apple.COM>
Date: 12 Jul 89 01:37:44 GMT
References: <635@sys.uea.ac.uk>
Organization: Apple Computer Inc, Cupertino, CA
Lines: 20