Home You are viewing an offline copy of Help Table of Contents

# Palettes NPS Image Editor allows the use of palettes in several places, such as when editing an indexed image. Palettes can also be used for color swatches to make selection easier. ## Palette creation If your image needs a palette but does not currently have one (such as when switching to Indexed mode). The New Palette dialog allows you to generate a palette from the colors in the image using several different algorithms or choose a predefined palette. ### Generating from your image NPS Image Editor can generate a palette for your image using various algorithms. Specify the maximum number of colors; note that this is a maximum and not a guaranteed number of colors. Check the "Add transparent color" box to include a transparent palette entry. This will automatically set your layer's transparency mode to Transparent Color and is useful if you're working with GIFs. If this box is unchecked, transparent regions will maintain their alpha channel. Note that if you want more control over which color to "sacrifice" to transparency, you should leave this box unchecked and edit the palette after creation. #### Median Cut This algorithm prioritizes the frequency of a color (or similar colors) to provide maximum detail in those areas. For example, an image with large regions of blue (like the sky) will end up with a large number of blue entries. #### Uniform These algorithms generate a uniform distribution of colors in each color space regardless of how often they appear in the image. The color space is split into smaller regions, then the image's pixels are grouped into those regions. The average color for each region "wins". (Regions without any colors in them are excluded.) #### Most Common Takes the most common unique colors from the image. No averaging is performed. #### First X Takes the first X unique colors from the image, going left to right and then top to bottom. This is a quick and easy way to generate a palette from an image with 256 or less colors. ### Fixed palette You can choose a fixed palette from a predefined list or import an existing palette from a file. ### Enter Manually Start with an empty palette and manually add colors to it. (The Color Picker's Screen mode can be helpful here.) ### Edit palette after creation This allows you to edit the palette before the image is quantized. You can tweak specific colors or add a transparent color in the exact place you prefer. ## Editing palettes The Palette Editor dialog displays the current palette for your layer or image. It is accessible through Color -> Edit Indexed Palette or by right-clicking on a layer and going into the Color Mode submenu. You can also optionally display it when generating a palette so you can modify it before applying it to your image. Click on a color to edit it. Depending on your document format, you may or may not be allowed to select semi-transparent colors. Right-click for more options, including the abiity to delete a color or make it fully transparent. ### Re-indexing In Indexed mode, editing a palette color will not modify the underlying image data, which allows you to re-color the image while maintaining its structure. If you want to drastically change the palette (such as by importing a new one or rearranging the colors), or just want to delete colors in the palette in a way that reduces the color count, you will need to check the "Re-index palette" checkbox. This will reinterpret image data to most closely match the new colors, but will lose the original structure. ### Palette operations Click the Palette menu in the lower left corner to access additional options for your colors. #### Export Saves the current set of colors to a file. This allows you to reuse those colors on a new image. #### Import Loads a set of colors from a file. This will automatically limit to 256 colors if the file contains more than 256. #### Replace with raw values Replaces all colors with the standard 256 color grayscale palette which maps exactly to the underlying pixel data. This can be helpful when trying to recover pixel data that was missing a palette. (Once the gray tones have been applied, you can open the editor again and change the colors.) #### Remove duplicates Removes identical colors in the image, ensuring that only one distinct color exists. This can make more room in your palette to add more colors. #### Trim from end Some image formats require an exact number of colors (such as 16 or 256) which pads the palette with empty colors, usually black or transparent, at the end. The Trim command will remove those colors. Unlike the Remove Duplicates command, it does not touch any duplicates that aren't at the end. #### Pad Adds empty colors as needed to fill the palette to 256 colors. This is functionally the opposite of the Trim command. #### Sorting options You can sort the colors in the palette using a specified dimension, randomize the order, or reverse the order. ### Palette filters Many filters, such as channel mixers or brightness adjustment, can be applied directly to the palette in indexed images. No special commands are necessary; just apply the filter as usual and note that it is the palette that has changed rather than the pixels. ## Swatch palettes Swatch palettes appear on the right sidebar of NPS Image Editor. They do not directly affect the image but allow for quick selection of the color. ### Generating swatches from the current image You can generate a swatch palette from the current image by clicking Color -> Swatches from image... If the image already has a palette, it will be copied to the swatch palette automatically. If it does not, a palette will be generated using the options you specify.