摘要 |
An emulator emulates a processor that provides a display in which each character is presented in a foreground color on a background color. The emulator maps the foreground colors and background colors into gray pixel patterns for display, with the foreground colors being mapped differently than the background colors. Each background color is mapped into a respective gray pattern, with some of the gray patterns representing more than one background color if necessary. In general, the foreground colors are mapped to three pixel patterns-white, 50% gray, and black. For a given background color, two of these three gray patterns are chosen as most legible, and one is used for the lighter foreground colors and the other for the darker foreground colors. In the special case where the foreground color is the same as the background color, however, the foreground color is mapped to the same gray pattern as the background color so that the character is invisible.
|