d.colors.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <h2>DESCRIPTION</h2>
  2. A color table file associates specific colors with the categories of a
  3. raster map layer. The user can change these map category color assignments
  4. (i.e., change the map's color table) interactively, by first displaying the
  5. raster map to the graphics monitor and then running the program
  6. <em>d.colors</em>.
  7. <p>Any color changes made using <em>d.colors</em> will not immediately be
  8. shown on the graphics display; however, any color changes saved will
  9. still alter the map's color table and will appear next time the raster
  10. map layer is redisplayed (see <em><a href="d.colortable.html">d.colortable</a></em>).
  11. <p>The user must first display the relevant raster map layer to the
  12. active frame on the graphics monitor (e.g., using
  13. <em><a href="d.rast.html">d.rast</a></em>) before running
  14. <em>d.colors</em>. The user can then either enter the name of the
  15. raster map layer whose color table is to be changed on the command
  16. line (e.g., by typing: <tt>d.colors map=soils</tt>), or type
  17. <tt>d.colors</tt> without program arguments. If the user simply types
  18. <tt>d.colors</tt> without program arguments on the command line,
  19. <em>d.colors</em> will ask the user to enter the name of an existing
  20. raster map layer using the standard GRASS interface.
  21. <p>In either case, the user is then presented with the <em>d.colors</em>
  22. command menu, shown below.
  23. <!-- This menu is the same as the category and color
  24. changing portion of the <em><a href="d.display.html">d.display</a></em>
  25. menu. -->
  26. The <em>d.colors</em> commands are listed beneath the Category
  27. Pointer Movement, Color Modification, Replotting Screen, and Quitting
  28. sections below. Commands are invoked by typing in the single-key response
  29. shown to the left below. (Longer descriptions of these commands appear to
  30. the right.) Results from invoking these commands will be reflected in the
  31. Category and Category Number sections of the <em>d.colors</em> screen. On
  32. the <em>d.colors</em> screen menu, commands appear in the right half of the
  33. screen, and the current status of categories appears in the left half of the
  34. screen.
  35. <pre>
  36. CATEGORIES
  37. 0 No Data
  38. 1 (Category 1 description)
  39. 2 (Category 2 description)
  40. . ....
  41. . ....
  42. CATEGORY NUMBER:
  43. RED 0 0%
  44. GREEN 0 0%
  45. BLUE 0 0%
  46. Shift Incr: 10 3%
  47. CATEGORY POINTER MOVEMENT
  48. D/d down (cats) Move pointer to next category
  49. U/u up (cats) Move pointer to previous category
  50. COLOR MODIFICATIONS
  51. R/r RED Increase/decrease RED intensity
  52. G/g GREEN Increase/decrease GREEN intensity
  53. B/b BLUE Increase/decrease BLUE intensity
  54. I/i increment Increase/decrease increment
  55. (of intensity shift)
  56. h highlight Highlight current color
  57. +/- shift colors Shift entire color table (up/down)
  58. c save color Save color table
  59. t toggle table Toggle to different color table
  60. REPLOTTING SCREEN
  61. * Replot screen Replots the screen
  62. QUITTING
  63. Q quit Quits program
  64. </pre>
  65. Changing categories - The keys
  66. <b>"d, D, u,"</b>
  67. and
  68. <b>"U"</b>
  69. are used to move to a different category. The lower case letters move up,
  70. <b>u,</b>
  71. and down,
  72. <b>d,</b>
  73. the category list one category at a time. The upper case letters move 10
  74. categories at a time for fast movement. The cursor does wrap between the
  75. first and last categories. The current category is noted on the text screen
  76. with an arrow, and is indicated on the graphics screen by a box around the
  77. current color.
  78. <p>
  79. Changing colors - The color associated with the current category can be
  80. changed with the
  81. <b>"R, r, G, g, B,"</b>
  82. and
  83. <b>b</b>
  84. keys. The upper case letters increase the intensities of
  85. red
  86. <b>R,</b>
  87. green
  88. <b>G,</b>
  89. and blue
  90. <b>B</b>
  91. for the current category; the lower case letters decrease the intensities of
  92. these same colors for the current category. Video devices make all the
  93. colors of the spectrum by mixing red, green, and blue. For those
  94. accustomed to red, yellow, and blue being the primary colors, this can
  95. be confusing. For starters, yellow is made by mixing red and green. The
  96. intensities are listed on the text screen in as percentages.
  97. <p>
  98. Keys <b>I</b> and <b>i</b> increase and decrease the
  99. percentage change that each keystroke of one of the color
  100. keys (<em>R, r, G, g, B, b</em>) causes in its respective
  101. color. The increase increment is initially set to 10%.
  102. Thus, pressing the <em>R</em> key would will increase the
  103. red component of the current category by 10%.
  104. <p>
  105. Highlight - The
  106. <b>h</b>
  107. key toggles between the current category color and the current
  108. highlight color. This color is initially black but can be modified as
  109. above while in highlight mode. Blinking can be accomplished by repeatedly
  110. striking the
  111. <b>h</b>
  112. key. When changing to different categories using the movement keys as
  113. described above, while in highlight mode the category colors will be
  114. always left showing their actual colors. Only one category is highlighted
  115. at any one time.
  116. <p>
  117. Saving the current color table -
  118. Pressing the <b>c</b> key will save the current color table as you have
  119. modified it. This table will then be used next time you
  120. display or paint this raster map layer.
  121. <p>
  122. Color table toggle - Different types of color tables are suitable for
  123. different raster map layers.
  124. The key
  125. <b>t</b>
  126. flips between the following color tables: red, green, blue color ramp; gray
  127. scale; smooth changing color wave; random colors; and the saved color table.
  128. <p>
  129. Color table shift - The entire table is shifted up and down using the
  130. <b>+</b>
  131. and
  132. <b>-</b>
  133. keys.
  134. <p>
  135. Quitting the <em>d.colors</em> program - Pressing the
  136. <b>Q</b> key will cause you to quit the <em>d.colors</em>
  137. program. If colors have been modified but not saved,
  138. <em>d.colors</em> will ask:
  139. <pre>
  140. Colors changed
  141. Save the changes? (y/n)
  142. </pre>
  143. The user should type in <b>y</b> to save changes,
  144. or <b>n</b> to not save changes, before quitting the program.
  145. If the user types <b>n</b>, the program will ask:
  146. <pre>
  147. Quit anyway? (y/n)
  148. </pre>
  149. <h2>NOTES</h2>
  150. <p>
  151. The map whose color table is to be altered with
  152. <em>d.colors</em> must already be on display in the active
  153. display frame on the graphics monitor before
  154. <em>d.colors</em> is run. This can be done using the
  155. command <em><a href="d.rast.html">d.rast</a> map=name</em> (where <em>name</em> is a raster map
  156. layer whose color table the user wishes to alter).
  157. <p>Some color monitors may not support the full range of colors required
  158. to display all of the map's categories listed in the map's color table.
  159. However, regardless of whether the user can see the color changes he is
  160. effecting to a map's color table, any changes to a map's color table
  161. made with <em>d.colors</em> that are saved will appear in the map's color table.
  162. <h2>SEE ALSO</h2>
  163. <em>
  164. <a href="d.colortable.html">d.colortable</a>,
  165. <a href="d.rast.html">d.rast</a>,
  166. <a href="r.colors.html">r.colors</a>
  167. </em>
  168. <h2>AUTHOR</h2>
  169. James Westervelt, U.S. Army Construction Engineering
  170. Research Laboratory
  171. <p><i>Last changed: $Date$</i>