[GRASS-dev] Re: [GRASS GIS] #170: r.colors: make nice random colors like r.watershed

GRASS GIS trac at osgeo.org
Mon May 19 05:05:20 EDT 2008


#170: r.colors: make nice random colors like r.watershed
--------------------------+-------------------------------------------------
  Reporter:  hamish       |       Owner:  grass-dev at lists.osgeo.org
      Type:  enhancement  |      Status:  new                      
  Priority:  minor        |   Milestone:  6.4.0                    
 Component:  default      |     Version:  svn-develbranch6         
Resolution:               |    Keywords:  r.colors                 
--------------------------+-------------------------------------------------
Comment (by hamish):

 re. the fairly dark r.watershed color rule:

 raster/r.watershed/ram/close_maps2.c
 {{{
 if((blue*.11 + red*.30 + green*.59) < 100) {
    G_set_color(r, rd, gr, bl, &colors);
 }}}


 Matlab (or Octave) calc:
 {{{
 >> rgb = [ 27 36 70 ]
 >> mult = [.11 .30 .59]
 >> sum(rgb .* mult)
 ans =

    55.0700
 }}}


 55.07 < 100   ???



 Hamish

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/170#comment:4>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list