Enter a ZIP code to get a forecast:
Setup Location

WRN Logo

Resource: color_fill

Resource color_fill
Command Line -cof=[value:]color[:attribute...],[value:]color[:attribute...],...
Environment Variable wxpclrfill
Default Value magenta, lmagenta, blue, lblue, cyan, lcyan, green, lgreen, brown, yellow, red, lred, dgray, lgray, white

This resource is used to specify a list of colors and attributes for color fill contours. Up to a total of 256 colors may be specified separated by commas. Also, a value of "end" automatically terminates the list. A value of "off" tells the contouring algorithm not to display that contour level. Each color/attribute may be preceded by a value which specifies the exact contour value to use for that color. The value represents the low end of the fill area. Color fill attributes also apply to line contours which allows line contours to have different style. The line contour colors can also color fill colors is the value of the color_cont resource is "off".


The color_fill resource allows a great deal of tailoring of contour plots and satellite images. The syntax for each color fill parameter is:


In the simplest form, the color fill list is just a list of colors to be used by the program to display color fill contours.  The first color is associated with the lowest contour value unless changed with the con_base resource.


Each color may also have attributes listed which modify the appearance of the color fill contours.


which uses a different fill pattern for the first color fill range. This can be used in conjuntion with line contours if the color_cont resource is set to "off". These attributes can be used to tailor the lines:


which is used to make every 5th line solid and all others dotted.

Color ranges may also be specified to simplify the list. For example:

   2-4 or red-blue

would be equivalent to red,green,blue. The attributes for the entire range come from the attributes listed for the first color in the range.

Finally, values can be attached to each color fill value.  This locks in a particular color to a specific contour range and can specify contour values which are not regular and thus cannot be specified with the con_interval resource.


This specifies the color fills for a precipitation field. When values are specified, a color bar automatically appears since this is necessary to denote irregular contour values.

As color fill settings get more complicated, it becomes more convenient to put the values in a file. WXP has a color fill file that can be specified with the color_fill resource:


The file has the same information except the values are put of different lines without the commas:


Up to 256 color fill values can be specified.

Contour Labels

The labels on the contour plot and color bar are based on the value listed. For example, the first value listed would be labeled ".01". To change this label, use the label parameter ".01:DDMagenta:la=min" or "85:red:la=HOT".

Line Contours

The color_fill resource is used to specify the attributes for each line contour. If this resource is specified, the lowest contour gets the first attribute listed and the next lowest, the second attribute listed and so on. This allows each line contour to be a different color.

If the color_cont resource is set to "off", the colors from the color_fill resource carry over to the line contours as well allowing each line to be a different color.

Radar Plots

For radar plots, the color_fill resource acts much like a plot of a color fill contour.  The default for a MDR plot is "off, blue, cyan, green, yellow, red, magenta".  The default for most other plots is the same as the default scale for other color fill plots.

Satellite Enhancement

Satellite enhancement uses the existing color fill setup where values can be specified for colors. The major differences are as follows:

  • The color values are image pixel values ranging from 0 to 255.
  • The value may be specified as a image pixel value or as a infrared temperature based on the GOES conversion scheme. The temperature is specified by preceding the value by a "c". For example, "c-25" specifies the image pixel value corresponding to -25 Celsius. This way infrared images can be enhanced based on the temperatures the image represents.
    NOTE: This works only for increasing image pixel values. As the image pixel values increase, the temperatures DECREASE and therefore temperature values must be listed in decreasing order.
  • The colors can be specified with dither value and color. This is handy for screens that cannot support gray shades such as monochrome displays. Dither colors are specified by using the following syntax:


    The original or background color is specified followed by a "%", then the dither percent value and the dither or foreground color. The above example uses the 3x3 dither matrix and gives possible dither values of 0 through 9. The result is a 6/9 dither of white over black. Using 0 for the dither value gives the original color. Using 9 for the value gives the only dither color. This is somewhat restrictive for monochrome screens, so a second dither scheme is provided which is a 5x5 dither matrix. This gives a total of 26 possible dither values which are specified by lower case alphabetic characters "a" through "z". The value "a" gives the original color and "z" gives the dither color. For example:


    gives a 12/25 dither.

The color fill file or more appropriately the enhancement file has an additional line at the beginning of the file that names the enhancement. Here is the MB enhancement file:


Additional Attributes

Attribute Description
co=color Specifies the color.  This is the color name from the color table.  If this is the first attribute, the "co=" may be omitted.
wi=width Specifies the width of lines.  This includes lines used in text and markers. The default value is 1.0.
st=style Specifies the style of lines.  Possible values are:
  • sol - solid lines (number 1)
  • dsh - dashed lines (number 2)
  • lsdsh - long short dashed lines (number 3)
  • llsdsh - long, long, short dashed lines (number 4)
  • dot - dotted lines (number 5)
  • # - a number corresponding to the above styles
fo=font Specifies the font number.  See the font_list resource.
Specifies the fill pattern. Possible values are:
  • sol - solid fill (number 0)
  • st - stippled fill (number 1)
  • ost - open stippled (number 2)
  • rst - random stipple (number 3)
  • lst - large stipple (number 4)
  • vln or || - vertical lines (number 5)
  • drl or // - diagonal lines moving to upper right (number 6)
  • dlr or \\ - diagonal lines moving to lower right (number 7)
  • hln or -- - horizontal lines (number 8)
  • hat or XX - hatched lines (number 9)
  • 0% - 0 % fill (number 10)
  • 1% - 11% fill (number 11)
  • 2% - 22% fill (number 12)
  • 3% - 33% fill (number 13)
  • 4% - 44% fill (number 14)
  • 5% - 55% fill (number 15)
  • 6% - 66% fill (number 16)
  • 7% - 77% fill (number 17)
  • 8% - 88% fill (number 18)
  • 9% - 100 % fill (number 19)
  • ## - a number associated with the above patterns
Specifies the scale factor.  For text, this is the text height. For markers, this is the size of the marker. The default value is 1.0.
te=expan Specifies the text expansion factor. This controls how wide text is plotted. An expansion factor greater than 1 results in fat text. A value less than 1 results in thin text. The default value is 1.0.
la=label Specifies the contour label.  This appears on the contour labels on the plot and on the color bar.  The label defaults to the contour value or the value listed in the color_fill resource. ".01:DDMagenta" would plot ".01" and "85:red:la=HOT" would plot "HOT".

Each of these can be specified with single characters (backward compatible with version  4). For example "w1.0" can be used for width, "h1.0" can be used for height, "s3" can be used for style, "f8" can be used for fill pattern, "t2" can be used for font, and "e1.0" can used for text expansion.

For further information about WXP, email technical-support@weather.unisys.com
Last updated by Dan Vietor on July 30, 1998