Back Home Table of Contents

NPL File Format

The NPL (NPS Image Editor Palette) format is a simple, human-readable, backwards-compatible format for storing a list of colors. It can be used for both swatches and basic color storage (e.g. when storing layer palettes in a NPSD file).

Basic Structure

A .npl file follows the well known INI format with 2 sections.

[NPS Palette]

REQUIRED but see note below about the Legacy NPL format below.

Elements:

  • FileVersion - REQUIRED. Specifies version of the file format which determines the available features. The current version is 2.0.
  • Columns - Optional. Specifies the number of columns to display in the swatch palette.
  • TileHeight - Optional. Specifies the swatch tile height in relative units. A value of 16 will result in a square when the number of columns is 6.
  • Border - Deprecated. Specifies whether or not to show a border in the swatch palette. This is no longer supported in NPS 3.x and 4.x.

[Colors]

This specifies a list of colors in resolvable color format. A color can either be specified as a single value, or as a 2-part expression of value=name where name is displayed when hovering over the color in the swatch palette.

Note that this section does not strictly conform to thE INI format because of the possible lack of a value for the "key", and duplicates are explicitly allowed (while many INI parsers require unique values).

Legacy NPL Format

Nookkin's Paint Shop 1.x and NPS Image Editor 2.x also stored colors in files with a .NPL extension. This is "version 1.0" of the format. This format is much simpler and just lists colors in OLE format (a 32-bit integer), optionally followed by a space and some text for the title of the color.

While NPS Image Editor 3.x and 4.x is capable of loading palettes in this format, it cannot save them.