Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!motcsd!hpda!hpcuhc!hpspcoi!jchristy
From: jchristy@hpspcoi.HP.COM (Jim Christy)
Newsgroups: comp.graphics
Subject: Re: color dithering?
Message-ID: <1360001@hpspcoi.HP.COM>
Date: 2 Oct 89 04:38:18 GMT
References: <6350007@hpcupt1.HP.COM>
Organization: HP PCG, Sunnyvale CA
Lines: 20



Color dithering is a simple extension of mono dithering.  You simply dither
each color component separately before combining them to create your final
pixel value (index into your color lookup table [LUT]). 

In other words, treat each color channel as you would a gray-scale.  Then
dither using any favorite dithering technique.  Foley and Van Dam discuss
this in some detail in Fundamentals of Interactive Computer Graphics.

It helps if you divide your color LUT uniformly among all three primaries.
Then your pixel value (LUT index) encodes what color you will actually get.
In your case, divide your 6-bit pixels into 2 bits of red, 2 bits of green,
and 2 bits of blue.  Now program your color LUT based on this ordering.

After dithering each color component, you get a value between 0 and 3 for
each of red, green and blue.  Now form your final pixel value by shifting
these numbers the appropriate number of places and ORing them together.

jhc