[comp.sys.apple2] 3200 color translations

johnmac@fawlty.towers.oz (John MacLean) (11/29/90)

For all you budding 3200 paint program authors, here is a way to
map all possible RGBs onto your 200 palettes (assuming this is
in a static palette mode):

Have a 8192 byte table mapping all 4096 colors onto the closest
of your (up to) 3200 colors.
Thus each word contains a relative color number from 0..3199.

Now have 200 tables mapping your (up to) 3200 colors onto the
16 colors in each palette.
These tables would be (up to) 1600 bytes each (each index only need
take up 1 nibble).
Thus you have up to a further 1600*200 = 320000 bytes of tables.

328K maximum storage required - not too bad at all - I always
thought you needed much more. You could possibly even simplify
things by putting the second level tables into 1 word per entry,
since most 3200 pics I have seen have much less than 1000 colors,
this would still not require too much storage.

With this method, you could easily (and speedily) paint in any
of the 4096 colors and have them mapped to the appropriate 16
colors in each palette.

I am yet to see any dynamic updating method that lets you get away
with less than several megabytes of tables (more than most users have).

Thats about it, any comments?
John MacLean.
-- 
This net: johnmac@fawlty.towers.oz.au                   Phone: +61 2 427 2999
That net: uunet!fawlty.towers.oz.au!johnmac             Fax:   +61 2 427 7072
Snail:    Tower Technology, Unit D 31-33 Sirius Rd,     Home:  +61 2 960 1453
          Lane Cove, NSW 2066, Australia.