

It sounds simple but real algorithms are counting the error after putting pixels and apply a different “tricks” to avoid artifacts. To make the color lighter use more white pixel, and to make it darker use more black pixels. On average it will result from a gray color. It’s simple just put a black pixel and a white after it.
#256 color palette converter how to
To understand dithering firstly figure out how to create a gray color from only black and white. All this can be done in compile time without performance loss. If you use a dithered image you will get a much better result on lower color depth. The exception is the subtle color fades where simply there is not enough color to create a smooth fade. On embedded systems 16-bit color depth is very common because it needs much less “wire” and memory than 24-bit colors and usually there is no or only minor difference in quality. Working form the same color palette (same number of colors) the dithered image looks much better.Ĩ bit (256 colors) image without ditheringĨ bit (256 colors) image with dithering Why use dithering? Both of the images below are using only 256 colors but the right one is dithered. It gives the effect that your image has greater color depth by manipulating pixels by a smart algorithm. What is dithering?ĭithering is an image (and audio) processing method. In this post, I will show you how to apply dithering on higher color depth images to get a better result at 16-bit color depth.

Fortunately, there is a solution which is called dithering. The 65k colors might be not enough to show the similar colors properly, but ugly stripes will appear. I’m sure that you have already faced with the problem when you have only 16-bit color depth and an image with smooth color fades.
