PaletteWB User Documentation

Table of Contents

1. Introduction
2. Color palettes and PaletteWB
3. Contact and Further Information
4. PaletteWB's Graphical User Interface
4.1. Overview
4.2. Image Viewer
4.3. Menu Bar
4.4. Tool Bar
4.5. User Database
A. Supported Palette Types
B. Formatted String Variables

1. Introduction

PaletteWB is a MS Windows software application for generating, importing, and converting color palettes. Conversion can be performed "in batch" for multiple files. Palettes can be also saved as .gif-files. In addition, PaletteWB can load or generate images, apply a new color map to them, and if wanted, export them as a color cycling .gif-file. The following palette formats are supported for im- and export:

The following formats can be exported only, but not read:

The following methods for generating palettes are implemented:

The following methods for generating images are implemented:

The following methods for manipulating palettes are implemented:

In addition, PaletteWB comes with a built-in palettes database.

This document is the user manual for PaletteWB, version 1.8. It contains information that explains what PaletteWB was designed for and how to use it.

PaletteWB was tried to be designed to please its users. We hope for a feedback on this. Please give us a notice about your experience with PaletteWB using the contact possibilities located at http://www.palettewb.com/. We would also be very lucky to be informed about errors within the application or mistakes in the documentation.

This user documentation is structured as following: Chapter 2 gives an introduction into color palettes and what PaletteWB is. Chapter 3 describes the interaction possibilities using PaletteWB's graphical user interface. The document closes with appendices that list the supported palette types and the available formatting options.

2. Color palettes and PaletteWB

Initially, computer images ("bitmaps") had a limited number of colors. Each pixel was not holding a value for red, green, and blue (RGB) as nowadays, but was rather pointing to a color in a color table. Such image formats, where each pixel points to an entry in a color palette are called indexed images. The color table itself is called "palette", "color map" or "color palette".

As usual, different formats for storing color palettes were developed. PaletteWB's main application is to convert between different formats.

Nowadays, color palettes can be found in .gif-images, which store indexed color images. As known, .gif-images are capable to store animations as well. Generating images by colorcycling - rotating the color map - is the second main application for PaletteWB.

In addition, PaletteWB can generate palettes and can generate as well example images, mainly for testing color cycling.

3. Contact and Further Information

PaletteWB has a web page at http://www.palettewb.com/. You may contact us by writing to info@palettewb.com.

4. PaletteWB's Graphical User Interface

4.1. Overview

The main window is divided into two sections, an image viewer part and a color map viewer part. Additionally, a menu bar and a tool bar exist that allow further interaction. The following image shows this graphical interface, its usage is described in the following.

Figure 4.1. Main PaletteWB window

Main PaletteWB window

4.2. Image Viewer

After starting the application or if an image was closed (see "Close Image"), the viewer is empty. As soon as an image was loaded (see "Open Image") or the user has generated an image (see "Image Generation"), the image is displayed within the viewer.

The user can zoom into (see "Zoom In (25%)") the image and out (see "Zoom Out (25%)") of image. You may as well zoom using the mouse wheel. The view can be restored to its original size (see "Normal Size").

4.3. Menu Bar

4.3.1. The "File" Menu

The File menu allows you to load and save images and color palettes from/to different formats. Additionally, a loaded palette can be exported as a gif-image. The File menu contains the following entries:

4.3.1.1. Exporting Palettes

Most palette formats are fixed. Yet, when exporting palettes to .css or to .js-files, additional format options can be set. This is also true when generating .gif-images that show the palettes. The individual options are described in the following.

The contents of palettes exported to HTML are currently fixed.

4.3.1.1.1. Exporting Palettes to JSON

When exporting palettes to .js/.json-files the following dialog will be shown.

Figure 4.2. JSON export dialog

JSON export dialog

You can define the following:

4.3.1.1.2. Exporting Palettes to CSS

When exporting palettes to .css-files the following dialog will be shown.

Figure 4.3. CSS export dialog

CSS export dialog

You can define the following:

4.3.1.1.3. Exporting Palettes to GIF

When exporting palettes as .gif-images the following dialog will be shown.

Figure 4.4. GIF export dialog

GIF export dialog

You can define the following:

4.3.1.1.4. Exporting Palettes to HTML

The content of a palette exported to HTML is a HTML-table where each cell stores the color of one palette entry. In addition, the HTML export includes the name and the file name of the palette.

4.3.2. The "Image" Menu

Here, you can find items for generating images, converting images to indexed images and for exporting a colorcycling animation

4.3.2.1. Image Generation

Currently, PaletteWB offers two ways to generate an image. They will be described in the following.

4.3.2.1.1. Mandelbrot

When choosing the menu entry "Image -> Generate -> Mandelbrot" the following dialog will be shown.

Figure 4.5. Mandelbrot fractal generation dialog

Mandelbrot fractal generation dialog

At the top of the dialog you may find presets you can select from.

The dialog offers additional controls for changing the selected area and setting the size of the image to generate:

The view is interactive. You can move the shown part when pressing the left mouse button and moving the mouse. You can use the mouse scroll wheel to zoom in/out. You may as well move the shown area with the cursor keys and zoom in/out using the keys '+' and '-', respectively.

Pressing "Reset" will reset the view to the first preset. Pressing "OK" generates the defined image, optionally asking whether the previous image shall be saved. "Cancel" will close the dialog without generating an image.

For further information about Julia sets, see the Wikipedia article about Mandelbrot sets.

4.3.2.1.2. Julia

When choosing the menu entry "Image -> Generate -> Julia" the following dialog will be shown.

Figure 4.6. Julia fractal generation dialog

Julia fractal generation dialog

At the top of the dialog you may find presets you can select from.

The dialog offers additional controls for changing the selected area and setting the size of the image to generate:

The view is interactive. You can select a new z by pressing the right mouse button within the area, you can as well move the mouse while holding the right button. You can move the shown part when pressing the left mouse button and moving the mouse. You can use the mouse scroll wheel to zoom in/out. You may as well move the shown area with the cursor keys and zoom in/out using the keys '+' and '-', respectively.

Pressing "Reset" will reset the view to the first preset. Pressing "OK" generates the defined image, optionally asking whether the previous image shall be saved. "Cancel" will close the dialog without generating an image.

For further information about Julia sets, see the Wikipedia article about Julia sets.

4.3.2.2. Image Conversion

PaletteWB can convert RGB-images into indexed images for applying color palettes to them.

4.3.2.2.1. To greyscale

The loaded image will be converted into a greyscale image. The brightness of each pixel is set to the average of the pixel's original RGB components. The palette will be set to a greyscale palette.

4.3.2.2.2. To indexed

The loaded image will be quantized and converted into an indexed 8bit-image. The palette will be obtained from the quantized colors of the image.

4.3.2.3. Image Transform

PaletteWB has some basic functionality to perform transformation operations on images.

4.3.2.3.1. Mirror horizontally

Mirrors the image horizontally, i.e. along the x-axis.

4.3.2.3.2. Mirror vertically

Mirrors the image vertically, i.e. along the y-axis.

4.3.2.3.3. Rotate 90° CW

Rotates the image by 90° clockwise.

4.3.2.3.4. Rotate 90° CCW

Rotates the image by 90° counter-clockwise.

4.3.2.4. Export Animation

This option allows to generate gifs animated by colorcycling. It can only be chosen, if an indexed image has been loaded or if a loaded image was converted to an indexed one.

When selected, a window that allows to select a filename to save the animation to is shown. After entering or selecting a valid filename, the following dialog is shown:

Figure 4.7. Animation export dialog

Animation export dialog

Here, you can define the start and the end indices between which the palette shall be rotated. Additionally, the animation speed stored in the .gif file can be changed.

4.3.3. The "Palette" Menu

The "Palette" menu contains entries for generating palettes, for manipulating them, and for converting palettes in batch.

4.3.3.1. Browse DB

PaletteWB comes with many free palettes. The menu entry "Palette -> Browse DB ..." opens a dialog that supports browsing this database and select a palette. The dialog looks as following.

Figure 4.8. Dialog for browsing the palettes database

Dialog for browsing the palettes database

You can select a color palette source using the "Subset" drop-down. The entry "all" lists all color palettes from all sources.

You may choose items using the mouse or the keyboard.

4.3.3.2. Palette Generation

PaletteWB comes with the following methods for generating palettes:

4.3.3.2.1. Generate a Greyscale Palette

When choosing the menu entry "Palette -> Generate -> Greyscale" the current palette will be replaced by a plain greyscale palette.

4.3.3.2.2. Generate a Palette by Interpolation

When choosing the menu entry "Palette -> Generate -> By Interpolation ..." the following dialog will be shown.

Figure 4.9. Dialog for generating a palette by interpolating between colors

Dialog for generating a palette by interpolating between colors

A PaletteWB-preset can be chosen using the "Preset" drop-down.

Below, you will find a representation of the generated palette. A small greyscale ramp hints to the position. The resulting palette is shown below. Below, you will find the field to interact with the diamond-shaped "ticks" which define the colors to interpolate between.

You may generate new ticks by double-clicking an empty (not occupied by a tick) space. You may delete ticks by pressing the right mouse button on a tick. You may move a tick by selecting it with a single click and moving it. You may change the color of a tick by a double-click on it.

Please note that the first (index=0) and last (index=255) ticks cannot be moved or deleted.

The dialog offers additional controls for dealing with a selected tick and defining the methods for interpolation:

4.3.3.2.3. Generate a Palette Using Cosini

When choosing the menu entry "Palette -> Generate -> Using Cosini ..." the following dialog will be shown.

Figure 4.10. Dialog for generating a palette using cosini

Dialog for generating a palette using cosini

The dialog offers additional controls for changing the selected area and setting the size of the image to generate:

You can change the parameters of the cosinus functions for the R, G, and B components.

For further information about generating palettes this way, see Inigo Quilez' article about palettes.

4.3.3.3. Applying Generation Patterns

A generation pattern may stretch a smaller palette. The following patterns are currently implemented:

They are described in the following.

4.3.3.3.1. Persian Raster

When choosing the menu entry "Palette -> Reorder -> Persian Raster ..." the following dialog will be shown.

Figure 4.11. Dialog for applying the Persian Raster repetition pattern

Dialog for applying the Persian Raster repetition pattern

You can change the following parameters:

See this blog entry about Persian rasters for further information.

4.3.3.4. Color Adjustment

Currently, PaletteWB supports the following color adjustment options:

They are described in the following.

4.3.3.4.1. Adjust Brightness / Contrast

When choosing the menu entry "Palette -> Adjust Colors -> Brightness / Contrast ..." the following dialog will be shown.

Figure 4.12. Dialog for changing the palette colors' brightness and contrast

Dialog for changing the palette colors' brightness and contrast

You can change the following parameters:

4.3.3.4.2. Adjust Hue / Saturation / Value

When choosing the menu entry "Palette -> Adjust Colors -> Hue / Saturation / Value ..." the following dialog will be shown.

Figure 4.13. Dialog for changing the palette colors' hue, saturation, and values

Dialog for changing the palette colors' hue, saturation, and values

You can change the following parameters:

If the "Colorize" checkbox is set, the hue will be directly applied instead of changing it.

4.3.3.4.3. Blur a Palette

When choosing the menu entry "Palette -> Adjust Colors -> Blur ..." the following dialog will be shown.

Figure 4.14. Dialog for blurring the palette

Dialog for blurring the palette

You can change the following parameters:

4.3.3.5. Reordering Indices

Currently, PaletteWB supports the following options for changing the order of a palette's colors:

They are described in the following.

4.3.3.5.1. Invert Order

When choosing the menu entry "Palette -> Reorder -> Invert Order" the order of the palette's colors will be inverted.

4.3.3.5.2. Shift by Offset

When choosing the menu entry "Palette -> Reorder -> Shift by Offset ..." the following dialog will be shown.

Figure 4.15. Dialog for shifting the palette color indices by an offset

Dialog for shifting the palette color indices by an offset

You can change the following parameters:

4.3.3.5.3. Sort Colors

When choosing the menu entry "Palette -> Reorder -> Sort Colors ..." the following dialog will be shown.

Figure 4.16. Dialog for sorting a palette's colors

Dialog for sorting a palette's colors

You can change the following parameters:

Please note that the image will look as-is, just that the color indices will change.

4.3.3.6. Batch Convert

This option allows you to convert multiple palettes in batch. When selecting "Palette -> Batch Convert...", the following dialog is shown:

Figure 4.17. Dialog for batch conversion

Dialog for batch conversion

This dialog allows you to select the individual files as well as folders. When selecting folders, all found palette files stored within them will be converted. Whether a file is a palette file or not is determined by the file's extension. Using the "Assume file format:" option, you can force PaletteWB to convert only certain types of palettes. The "Convert to:" option allows you to set the format to convert the palettes to. The extension used by this file format will be automatically set. When exporting, some palette formats can have additional options, see Exporting Palettes. They can be set using the "Extended Settings" option.

4.3.4. The "View" Menu

Here, the zoom at a loaded/generated image can be changed:

4.3.5. The "Help" Menu

Contains basic information about the application.

4.4. Tool Bar

The tool bar contains shortcuts to the following menu entries which also can be found within the menu bar and were described previously:

4.5. User Database

If purposeful, dialogs contain a menu bar for loading / saving the current dialog values. Values can be either saved to / loaded from files, or can be stored in an internal database (DB). The following actions are possible:

In the following, these options will be described, first. Then, a description of the used format for importing and exporting the current dialog values to files is given.

- Beschreibungen

4.5.1. Interacting with the User Database

In the following, possibilities to interact with the user database are described.

4.5.1.1. Saving to DB

A new dialog value set can be stored in the user database. When pressing this button, you will be asked to enter a name for the value set. If the name already exists for this dialog, you will be informed. Otherwise, the current value set is stored in the database and can be restored afterwards.

4.5.1.2. Removing from DB

A value set previously saved by the user can be removed from the database. When pressing this button, you will be asked whether you really want to delete the value set. When confirmed, the value set is removed from the database and cannot be access in future.

Please note that internal value sets (presets) cannot be removed.

4.5.1.3. Rename in DB

A value set previously saved by the user can be renamed. When pressing this button, you will be asked for a new name of the value set. If the entered name already exists, you will be informed. Otherwise, the entry in the database will be renamed and is afterwards accessible via the new name.

Please note that internal value sets (presets) cannot be renamed.

4.5.1.. Reload DB

The contents of the user database can be altered while PaletteWB is running, e.g. through a second instance. For this purpose, it is possible to reload the current settings. When this button is pressed, the current database state is loaded.

4.5.1.5. Read from file

Value sets can be imported from files. Usually, such files are generated using the "Save to file" method. The format of these files is described in Import / Export Format.

When pressing this button, a file dialog will be shown where you can choose the file to read. When selecting a file, it will be loaded. If any error occurs, you will be informed.

4.5.1.6. Save to file

Value sets can be exported to files. The format of these files is described in Import / Export Format.

When pressing this button, a file dialog will be shown where you can choose a folder and a name to save the current value set to. If a file name was chosen, the current value set will saved into this file.

4.5.2. Import / Export Format

Dialog value sets are stored as key/value pairs in text files.

At first, a header is written, consisting of the dialog name and the application version. Then, every dialog element (selection, value, option) is stored in an own line, the name first, then the value.

As such, the format is:

<DIALOG_NAME> <PALETTEWB_VERSION>
(<ENTRY_NAME>: <ENTRY_VALUE>)+

E.g., when exported, the value set for the adjust brightness / contrast dialog which decreases the brightness by 63 and increases the contrast by 61 will look as following:

brightness_contrast 1.8.0
brightness:-63
contrast:61

Appendix A. Supported Palette Types

The following table shows which palette formats are known by PaletteWB.

Table A.1. Palette formats that can be imported and exported

Palette FormatExtensionCan be readCan be written
GIMP palettegplyesyes
Adobe Photoshop paletteacoyesyes
Fractint palettemapyesyes
Microsoft palettepalyesyes
A hexadecimal color listhextxtyesyes
JavaScript listjsnoyes
CSS color listcssnoyes
HTML (as a table)htmlnoyes

Appendix B. Formatted String Variables

At some places, a FORMAT_STRING is used. The string may contain placeholders for current values, e.g. the color table entry's index. The following placeholders are supported:

Table B.1. FORMAT_STRING variables

Palette FormatExtension
%fthe filename without extension
%nthe name of the palette if given in the file, otherwise the file name (%f)
%ithe index of the palette entry

Legal Information

Daniel Krajzewicz Jochen-Nüßler-Straße 5
12359 Berlin
USt-IdNr.: DE281155133
© Copyright 2009-2021 Daniel Krajzewicz
Last changed on January 21 2022 22:11:39.
435 visitors.
Contact: info@palettewb.com