r.colors(1)		      Grass User's Manual		   r.colors(1)



NNAAMMEE
       _r_._c_o_l_o_r_s  -  Creates/Modifies  the color table associated with a raster
       map layer.

       _(_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       rr..ccoolloorrss

       rr..ccoolloorrss hheellpp

       rr..ccoolloorrss [--wwqq] mmaapp==_n_a_m_e [ccoolloorr==_t_y_p_e] [rraasstt_=_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _r_._c_o_l_o_r_s allows the user to create and/or modify the color table for  a
       raster  map  layer.  The  map  layer  (specified on the command line by
       mmaapp==_n_a_m_e) must exist in the user's  current  mapset  search  path.  The
       color table specified by ccoolloorr==_t_y_p_e must be one of the following:

	    color type	  description
	    aspect	  (aspect oriented grey colors)
	    grey	  (grey scale)
	    grey.eq	  (histogram-equalized grey scale)
	    grey.log	  (histogram logarithmic transformed grey scale)
	    byg 	  (blue through yellow to green colors)
	    byr 	  (blue through yellow to red colors)
	    gyr 	  (green through yellow to red colors)
	    rainbow	  (rainbow color table)
	    ramp	  (color ramp)
	    random	  (random color table)
	    ryg 	  (red through yellow to green colors)
	    wave	  (color wave)
	    rules	   (create  new  color	table  based on user-specified
       rules)

       If the user specifies the --ww flag, the current color table file for the
       input  map  will not be overwritten. This means that the color table is
       created only if the _m_a_p does not already have a color  table.  If  this
       option  is  not	specified, the color table will be created if one does
       not exist, or modified if it does.

       If the user sets the --qq flag, _r_._c_o_l_o_r_s will run quietly, Without print-
       ing numerous messages on its progress to standard output.

       Color  table  types  _a_s_p_e_c_t_,  _g_r_e_y_,  _g_r_e_y_._e_q  (histogram-equalized grey
       scale), _b_y_g (blue-yellow-green), _b_y_r (blue-yellow-red), _g_y_r (green-yel-
       low-red),  _r_a_i_n_b_o_w_,  _r_a_m_p_, _r_y_g (red-yellow-green), _r_a_n_d_o_m, and _w_a_v_e are
       pre-defined color tables that _r_._c_o_l_o_r_s knows how to create without  any
       further input.

       The  _r_u_l_e_s  color  table  type  will cause _r_._c_o_l_o_r_s to read color table
       specifications from standard input (stdin) and will build the color ta-
       ble accordingly.

       Using color table type _r_u_l_e_s, there are three ways to build a color ta-
       ble: by color list, by category values, and by "percent" values.

       Building a customized color table by color list is the simplest of  the
       three  rules  methods:  just  list the colors you wish to appear in the
       color table in the order that you wish them to appear. Use the standard
       GRASS  color  names:  white,  black, red, green, blue, yellow, magenta,
       cyan, aqua, grey, gray, orange, brown, purple, violet, and indigo.

       For example, to create a color table for the raster map layer _e_l_e_v_a_t_i_o_n
       that  assigns  greens  to  low  map category values, browns to the next
       larger map category values, and yellows to the still larger  map  cate-
       gory values, one would type:

       rr..ccoolloorrss mmaapp==_e_l_e_v_a_t_i_o_n ccoolloorr==_r_u_l_e_s

       green

       brown

       yellow

       end

       To  build  a  color  table by category values' indices, the user should
       determine the range of category values in the  raster  map  layer  with
       which  the color table will be used. Specific category values will then
       be associated with specific colors. Note that a color does not have  to
       be assigned for every valid category value because _r_._c_o_l_o_r_s will inter-
       polate a color ramp to fill in where  color  specification  rules  have
       been left out. The format of such a specification is as follows:

       ccaatteeggoorryy__vvaalluuee ccoolloorr__nnaammee

       ccaatteeggoorryy__vvaalluuee ccoolloorr__nnaammee

       .... ....

       .... ....

       ccaatteeggoorryy__vvaalluuee ccoolloorr__nnaammee

       eenndd

       Each  category  value  must be valid for the raster map layer, category
       values must be in ascending order and only  use	standard  GRASS  color
       names (see above).

       Colors  can also be specified by color numbers each in the range 0-255.
       The format of a category value color table  specification  using  color
       numbers instead of color names is as follows:

       ccaatteeggoorryy__vvaalluuee rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       ccaatteeggoorryy__vvaalluuee rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       .... .... .... ....

       .... .... .... ....

       ccaatteeggoorryy__vvaalluuee rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       eenndd

       Specifying  a  color  table  by	"percent" values allows one to treat a
       color table as if it were numbered from 0 to 100. The format of a "per-
       cent"  value  color  table  specification is the same as for a category
       value color specification, except that the category values are replaced
       by "percent" values, each from 0-100, in ascending order. The format is
       as follows:

       ppeerrcceenntt__vvaalluuee%% ccoolloorr__nnaammee

       ppeerrcceenntt__vvaalluuee%% ccoolloorr__nnaammee

       .... ....

       .... ....

       ppeerrcceenntt__vvaalluuee%% ccoolloorr__nnaammee

       eenndd

       Using "percent" value color table specification rules, colors can  also
       be  specified by color numbers each in the range 0-255. The format of a
       percent value color table specification using color numbers instead  of
       color names is as follows:

       ppeerrcceenntt__vvaalluuee%% rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       ppeerrcceenntt__vvaalluuee%% rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       .... .... .... ....

       .... .... .... ....

       ppeerrcceenntt__vvaalluuee%% rreedd__nnuummbbeerr ggrreeeenn__nnuummbbeerr bblluuee__nnuummbbeerr

       eenndd

       Note  that you can also mix these three methods of color table specifi-
       cation; for example:

       00 bbllaacckk

       1100%% yyeellllooww

       7788 bblluuee

       mmaaggeennttaa

       ppuurrppllee

       bbrroowwnn

       110000%% 00 225555 223300

       eenndd

EEXXAAMMPPLLEESS
	      The below example shows how you can specify colors for  a  three
	      category	map, assigning red to category 1, green to category 2,
	      and blue to category 3. Start by using a text editor,  like  _v_i,
	      to  create  the following rules specification file. Save it with
	      the name _r_u_l_e_s_._f_i_l_e.


       11 rreedd

       22 ggrreeeenn

       33 bblluuee

       eenndd

       The color table can then by assigned to map  _t_h_r_e_e_c_a_t_s  by  typing  the
       following  command  at  the  GRASS>  prompt:  ccaatt rruulleess..ffiillee || rr..ccoolloorrss
       mmaapp==_t_h_r_e_e_c_a_t_s ccoolloorr==_r_u_l_e_s


	      To create a natural looking LUT for true	map  layer  _e_l_e_v_a_t_i_o_n,
	      use the following rules specification file. It will assign light
	      green shades to the lower elevations (first 20% of the LUT), and
	      then  darker  greens  (next  15%, and next 20%) and light browns
	      (next 20%) for middle elevations, and darker browns  (next  15%)
	      for  higher elevations, and finally yellow for the highest peaks
	      (last 10% of LUT).  0% 0 230 0

	      20% 0 160 0

	      35% 50 130 0

	      55% 120 100 30

	      75% 120 130 40

	      90% 170 160 50


       Option rraasstt allows user to specify a raster map _n_a_m_e from which to copy
       the color map.

SSEEEE AALLSSOO
       _d_._c_o_l_o_r_m_o_d_e

       _d_._c_o_l_o_r_s

       _d_._c_o_l_o_r_t_a_b_l_e

       _d_._d_i_s_p_l_a_y

       _d_._l_e_g_e_n_d

       _p_._c_o_l_o_r_s

       _r_._s_u_p_p_o_r_t

AAUUTTHHOORRSS
       Michael Shapiro and David Johnson

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_3_/_0_2_/_0_9 _1_2_:_0_7_:_2_3 _$



GRASS 5.0							   r.colors(1)
