NetLogo Help: scale-color

### scale-color1.0

#### scale-color color number range1 range2

Reports a shade of color proportional to the value of number.

When range1 is less than or equal to range2, then the larger the number, the lighter the shade of color. However, if range2 is less than range1, the color scaling is inverted.

Let min-range be the minimum of range1 and range2. If number is less than or equal to min-range, then the result is the same as if number was equal to min-range. Let max-range be the maximum of range1 and range2. If number is greater than max-range, then the result is the same as if number was equal to max-range.

Note: for color shade is irrelevant, e.g. green and green + 2 are equivalent, and the same spectrum of colors will be used.

    ask turtles [ set color scale-color red age 0 50 ]
    ;; colors each turtle a shade of red proportional
    ;; to its value for the age variable

Take me to the full NetLogo Dictionary