Introduction to Pseudo-Palettes in Bmp2DHR  

 

The images in the middle column were converted using Bmp2DHR’s Pseudo-Palette option to combine 4 NTSC palettes into a “real time” user-defined palette.

 

Original Image – 24-bit BMP

Bmp2DHR – HGR – Buckels Dither

Tohgr – HGR – Floyd-Steinberg Dither

Bmp2DHR – DHGR - NTSC Pseudo-Palette

Bmp2DHR – DHGR – Buckels Dither  

Tohgr – DHGR – Floyd-Steinberg Dither

The 4 combined palettes are tohgr’s DHGR palette, the Wikipedia Composite Palette, the Jace Emulator Palette and Robert Munafo’s NTSC palette.

 

Original Image – 24-bit BMP

Bmp2DHR – DHGR – Buckels Dither  

Tohgr – DHGR – Floyd-Steinberg Dither

Bmp2DHR – HGR – NTSC Pseudo-Palette

Bmp2DHR – HGR – Buckels Dither  

Tohgr – HGR – Floyd-Steinberg Dither

 

These palettes are all “built-in” to Bmp2DHR. The RGB display sees HGR and DHGR differently than the NTSC display.

 

Bmp2DHR – HGR – Buckels Dither

Tohgr – HGR – Floyd-Steinberg Dither

Bmp2DHR – DHGR – Buckels Dither  

Tohgr – DHGR – Floyd-Steinberg Dither

 

Bmp2DHR – HGR – Buckels Dither

Tohgr – HGR – Floyd-Steinberg Dither

Bmp2DHR – DHGR – Buckels Dither  

Tohgr – DHGR – Floyd-Steinberg Dither

 

Color Palettes in Bmp2DHR – Option “P”-(P0 to P16)

 

Bmp2DHR has a large selection of color conversion palettes; Bmp2DHR includes 16 built-in palettes for conversion (and for preview output) and also imports user palettes in several text formats including The GIMP’s gpl palette format. One of Bmp2DHR’s palettes (Palette 15) is called a “Pseudo-Palette”.   

 

Only the palettes that are based on Apple II Hardware Palettes can be used for “nearest color conversion”. Bmp2DHR’s “Legacy” Software Palettes are included to support Color Substitution schemes that I implemented in earlier Apple II graphics converters that I wrote.  This excludes all palettes in the range of Palettes 7 to 11 (commands P7 to P11). Attempting “nearest color” conversion with “color substitution” palettes will usually produce wrongheaded results. The following palettes are a “better bet”.

 

NTSC Palette 4

Wikipedia Apple II Colors

NTSC Palette 5

Tohgr HGR Conversion Colors

NTSC Palette 13

Jace Emulator Colors

NTSC Palette 14

Robert Munafo’s Colors

 

Display Considerations

 

HGR and DHGR colors are based on the YIQ color system and predate the Apple II RGB display. The YIQ system is intended to take advantage of human color-response characteristics. The RGB Color Model is also based on human color perception, as are Palettes 0 to 5 (commands P0 to P5), and Palettes 12 to 16 (commands P12 to P16), with the possible exception of Palette 15 which is a placeholder for Pseudo-Palettes. Palette 6 (P6) is a placeholder for imported palettes when loaded.

 

Bmp2DHR uses the RGB values in these palettes for nearest color conversion to Apple II colors based on CCIR 601 luminosity (without GAMMA correction), with the hope that the converted HGR or DHGR image will be a Psycho-Visually correct  representation of the original image to the best ability of the Apple II display. NTSC palettes work best for human perception of HGR and DHGR colors because the Apple II did not use RGB as its main method to manage colors.

 

HGR and DGHR display completely differently on the Apple IIgs (or the Apple IIe) with an RGB display than they do on an NTSC display; the colors are differently hued and an RGB display cannot take advantage of the NTSC display’s fringe colors so the number of available colors is drastically reduced on an RGB display.

 

When the Apple II came out on June 10, 1977, a new video mode had been added; 280 × 192 high-resolution graphics (HGR) with a color resolution of 140 x 192. Apple did not manufacture or sell displays of any kind, instead recommending users plug-into their television sets. Shortly after the Apple IIe was introduced in 1983, double high-resolution graphics (DHGR) was also introduced, but it wasn’t until 1985 that Apple Computer began to sell color monitors, beginning with an RGB display with different HGR and DHGR display characteristics than a “real” Apple II NTSC display; a television set!  HGR and DHGR were intended for use on an NTSC composite color or monochrome monitor or a color or black and white NTSC television.      

 

Pseudo-Palette Definition

 

Bmp2DHR – Default Palette 5

Tohgr DHGR NTSC Conversion Colors

Bmp2DHR – Palette 4

Wikipedia Apple II Composite Colors

Bmp2DHR – DHGR Pseudo-Palette 15

In-Between Palette 5 and Palette 4

Bmp2DHR – HGR Pseudo-Palette 15

In-Between Palette 5 and Palette 4

 

In Bmp2DHR, a Pseudo-Palette is a “false” palette created by using the average RGB color values of two or more (up to 100) of Bmp2DHR’s “real” palettes. It can be thought of as an automatic palette (“auto-palette”). Or you can think of it as a “do-it-yourself” palette with a little help.

 

Pseudo-Palette - Command Option “PP” – PP0 to PP16

 

Bmp2DHR’s palettes start at Palette 0 and end at Palette 16. Any of these can be used for either HGR or DHGR conversion and any of these (with the exception of Palette 15) can be used to create a Pseudo-Palette.

 

The first palette in a Pseudo-Palette is selected by entering the command “P” followed by the palette number in the range of 0-16 (excluding Palette 15). If no first palette is selected the default palette, P5 will be used as the first palette.

 

After the first palette is selected, subsequent palettes in a Pseudo-Palette are selected by consecutively entering the command “PP” followed by the palette number in the range of 0-16 (excluding Palette 15).  A separate “PP” is required for each palette, separated by a space.

 

Text File Output – Command Option “Q” – Quiet Mode

 

When a Pseudo-Palette is selected, a “clean” comma-separated  list of the 16 RGB values in the Pseudo-Palette can be printed to the console (standard output) or can be redirected to disk (as a text file) for future use by entering option “Q” on the Bmp2DHR command line. This list can be used as-is, as an imported palette in Bmp2DHR.

 

Using RGB Palettes in Pseudo-Palettes

 

Both HGR and DHGR convert best using NTSC palettes like tohgr’s palettes. Some colors in a converted image are more difficult to present in HGR’s 6-colors than in DHGR’s 15 colors, and really need NTSC to look their best. Apple IIgs palettes like Kegs32 and CiderPress are RGB palettes.  For DHGR conversions, RGB palettes like Kegs32 can be used if your intended target display is RGB only and if you are happy with the results. But generally and regardless of the fact that Kegs32 uses the same palette as Super Convert did for converting HGR and DHGR images, RGB palettes do not make good conversion palettes “as-is” nor do they make good conversion palettes even as Pseudo-Palettes.

 

Additional Examples of NTSC Pseudo-Palettes and Comparisons

 

The images below continue with additional examples of the 4-palette Pseudo-Palette combining tohgr’s DHGR palette, the Wikipedia Composite Palette, the Jace Emulator Palette and Robert Munafo’s NTSC palette shown in the examples above. Examples of other Pseudo-Palettes and Bmp2DHR’s default palette are also shown below.

 

Original Image – 24-bit BMP

Bmp2DHR – DHGR – Buckels Dither  

Tohgr – DHGR – Floyd-Steinberg Dither

Bmp2DHR – HGR – Monochrome Palette

Bmp2DHR – HGR – Buckels Dither  

Tohgr – HGR – Floyd-Steinberg Dither

 

The following images are converted with Pseudo-Palettes that combine only 2 palettes selected between a 3 palette group containing the Wikipedia Composite Palette, the Jace Emulator Palette and Robert Munafo’s NTSC palette.     

 

Bmp2DHR – DHGR - Wikipedia-Jace Pseudo

 

Bmp2DHR – DHGR – Wikipedia-Munafo

Bmp2DHR – DHGR – Jace-Munafo Pseudo

Bmp2DHR – HGR - Wikipedia-Jace Pseudo

Bmp2DHR – HGR – Wikipedia-Munafo

Bmp2DHR – HGR – Jace-Munafo Pseudo

 

The following images are converted with Pseudo-Palettes that combine only 2 palettes selected between a 3 palette group containing tohgr’s HGR palette, tohgr’s DHGR palette, and Robert Munafo’s NTSC palette.   

 

Bmp2DHR – DHGR – both tohgr palettes

 

Bmp2DHR – DHGR – Munafo-tohgr HGR

Bmp2DHR – DHGR – Munafo-tohgr DHGR

Bmp2DHR – HGR – both tohgr palettes

Bmp2DHR – HGR – Munafo-tohgr HGR

Bmp2DHR – HGR – Munafo-tohgr DHGR

 

It is left as an exercise for the reader to try additional combinations. The following images are converted using Bmp2DHR’s default palette (tohgr colors) only and not a Pseudo-Palette at all. Bmp2DHR uses tohgr’s NTSC DHGR conversion palette as its default palette because in general it provides the best overall results.

 

Original Image – 24-bit BMP

Bmp2DHR – Default HGR – Buckels Dither

Tohgr – HGR – Floyd-Steinberg Dither

Bmp2DHR – Default DHGR – Buckels Dither

Bmp2DHR – Default DHGR – Floyd-Steinberg

Tohgr – DHGR – Floyd-Steinberg Dither

 

The converted images above are shown below on an RGB display rather than an NTSC display. Monochrome Output is also shown below on an NTSC Black and White Television display. The RGB display is not capable of achieving NTSC’s grey-scale effect for Monochrome any more than it is capable of displaying HGR and DHGR correctly.

 

Black and White TV Display

Bmp2DHR – HGR – Monochrome Palette

Bmp2DHR – Default HGR - RGB Display

Tohgr – HGR – RGB Display

Black and White TV Display

Bmp2DHR – DHGR – Monochrome Palette

Bmp2DHR – Default DHGR - RGB Display

Tohgr - DHGR - RGB Display

 

Original Image – 24-bit BMP

Bmp2DHR – Default DHGR – Buckels Dither

Tohgr – DHGR – Floyd-Steinberg Dither

Original Image – 24-bit BMP

Bmp2DHR – Default DHGR – Buckels Dither

Tohgr – DHGR – Floyd-Steinberg Dither

 

Separate images using NTSC and RGB palettes respectively can be used for the NTSC and RGB displays. The DHGR images shown above on the NTSC display are also shown below on the RGB display, beside their RGB counterparts converted with Super Convert’s RGB Palette 15.

 

Bmp2DHR – DHGR - Super Convert Palette

 

Bmp2DHR – Default DHGR – Buckels Dither

Tohgr – DHGR – Floyd-Steinberg Dither

Bmp2DHR – DHGR - Super Convert Palette

 

Bmp2DHR – Default DHGR – Buckels Dither

Tohgr – DHGR – Floyd-Steinberg Dither

 

There is still no getting around the fact that unlike NTSC DHGR colors, RGB DHGR colors do not balance well enough for good conversion. The images below are converted using the default built-in “placeholder” Pseudo-Palette 15, which is Bmp2HR’s default tohgr Palette 5 combined with Super Convert Palette 12.    

 

Bmp2DHR – Default Pseudo-Palette 15

NTSC Palette 5 Pseudoed with RGB Palette 12

 

The output above from Bmp2DHR using the default Pseudo-Palette with its NTSC to RGB average color distance provides a better compromise than Apple Computer’s own choice of Hardware Palette when it comes to converting DHGR colors that were available on the NTSC display to equivalent “colors that could have been” on the DHGR RGB display.   

 

It is left as an exercise for the reader to develop a better DHGR conversion palette for the RGB display. Bmp2DHR’s Pseudo-Palette can be used as a starting point, and its optional output can be tweaked and loaded as an external palette for “fine-tuning”. What the reader will do with the RGB’s two shades of grey for this exercise remains a mystery; the Pseudo-Palette simply uses a mean distance. Super-Convert did not provide HGR or DHGR output but using Bmp2DHR’s preview option and Super Convert’s Palette is just as good as viewing in kegs32 or on the Apple IIgs when it comes to testing the results of such an exercise, since modern displays and RGB displays both use the RGB Color-Space.

 

The same images converted above using the default Pseudo-Palette are shown below on the NTSC display beside their NTSC and Super-Convert counterparts.

 

 

Bmp2DHR – tohgr NTSC colors

Bmp2DHR – NTSC – RGB Pseudo-Palette

Bmp2DHR – Super Convert RGB Colors

Bmp2DHR – tohgr NTSC colors

Bmp2DHR – NTSC – RGB Pseudo-Palette

Bmp2DHR – Super Convert RGB Colors

 

A similar compromise for HGR conversion does not seem to exist. NTSC palettes work best.

  

Any Questions?

Original Image – 24-bit BMP

Bmp2DHR – Default HGR – Buckels Dither

Tohgr – HGR – Floyd-Steinberg Dither

Bmp2DHR – Mono DHGR – Buckels Dither

Bmp2DHR – Default DHGR – Buckels Dither

Tohgr – DHGR – Floyd-Steinberg Dither

 

The opinions expressed in this document are the results of original research by the author (Bill Buckels).