摘要 |
<p>A method and system for generating a dither pattern for a specified color are provided. In a preferred embodiment, the system generates a dither pattern corresponding to a specified RGB value. Each RGB value in the set of active colors is defined as a point in a three dimensional coordinate system having a red, green and blue component. The coordinate system is logically divided into a set of non-overlapping, tetrahedral spaces with each vertex representing a solid color. One tetrahedal space is designated as a mappin tetrahedral space. The system maps the specified RGB value to the mapping tetrahedral space from an original tetrahedral space containing the specified RGB value. The system then determines the four active colors whose corresponding RGB values are closest to the mapped RGB value. The system then determines the number of pels in the dither pattern to set to each determined active color based on the distance between the RGB value corresponding to the determined active color and the mapped RGB value. The system then maps the determined active colors to the original tetrahedral space. Finally, the system sets the pels in the dither pattern to the mapped active colors based on the determined number of pels for that color and a predefined base pattern to effect the generation of the dither pattern.</p> |