Creating a color map (.clr) file

A custom color map file can be created in the Layer Properties dialog box, using the Unique Values renderer on the Symbology tab. Using this symbology editor, you can define the pixel values and the color that will be used for each pixel value.

Only single-band integer raster datasets with pixel depths of 16 bits unsigned or fewer can be used to create a color map (.clr) file.

A .clr file is saved so that all values within the pixel depth are consecutive and inclusive. If there are any missing values, it will be assumed that the color is 0, 0, 0.

A .clr file is a space-delimited text file that defines the pixel value and the red, green, and blue color values. The red, green, and blue values can range from 0 to 255. For example, the following image can have a .clr file defined with the following five rows:

Color map table
1 255 255 0
2 64 0 128
3 255 32 32
4 0 255 0
5 0 0 255

Steps:
  1. Add a single-band raster dataset to ArcMap.
  2. Right-click the raster dataset in the table of contents and click Properties.
  3. Click the Symbology tab.
  4. Choose the Unique Values renderer.
  5. Edit the symbol color to the appropriate color for each value.

    You can edit each symbol color, or you can choose a preset color ramp.

  6. When you are ready to save the color scheme, click the Colormap button and click Export a Colormap.
  7. Choose the location and name to save the .clr file and click Save.

    Once a .clr file is created, the Add Colormap tool can be used to apply the color to a raster dataset.

    The .clr file can be edited in a text editor, but be sure to only use spaces between values in each row in the file.

Related Topics

5/18/2014