The Naval Research Laboratory's Map Data Formatting Facility is developing a seamless, compressed, digital database of the world called the Compressed Aeronautical Chart (CAC). The CAC consists of scanned, aeronautical chart images. The CAC's primary purpose is to support Navy and Marine Corps aircraft mission planning and digital moving map systems. However, other users on various platforms have expressed interest in using the CAC. Therefore, the CAC must be capable of adapting to the graphics capabilities of other platforms.The CAC uses a set of custom color palettes that consists of 240 distinct colors. Each pixel from the precompressed data at full color (24-bit) indexes to its closest color palette entry as decided by its Euclidean distance. Custom color palettes tend to maintain color integrity between the CAC and the original data.Since graphics capabilities vary from platform to platform, the ability to reduce and remap a color palette is a useful tool. This paper describes the technique chosen to remap the CAC color palettes to the desired, reduced set of colors. An enhancement technique that uses a contrast stretch algorithm is also described. The enhancement is achieved by first calculating a given palette's luminance (Y) values. Then, a ratio of the contrast stretch luminance to the original luminance value is derived for each color in a given color palette.
Michael E. Trenchard, Lancelot M. Riedlinger, Stephanie A. Myrick, Marlin L. Gendron, "Color Palette Reduction and Enhancement Techniques" in Proc. IS&T 1st Color and Imaging Conf., 1993, pp 178 - 180, https://doi.org/10.2352/CIC.1993.1.1.art00044