Chapter Contents

Previous

Next
Image Color Map: _generateColorRamp

Image Color Map: _generateColorRamp



Generates a color ramp of RGB colors


Syntax
Details
Example

Syntax

CALL SEND (object-id, '_generateColorRamp', reds, greens, blues);

Argument Type Description
reds
N the number of red colors to be generated
greens
N the number of green colors to be generated
blues
N the number of blue colors to be generated


Details

Generates a color ramp of RGB colors that fill the RGB color spectrum, given a specified number of red, green, and blue shades to use. This method generates a color map of reds×greens×blues colors, with a maximum of 256 colors allowed. You can generate a color map consisting only of reds, greens, or blues by specifying that only one shade be used for the other two colors.


Example

This example generates a ramp of five shades of green and lists the color map:

   call send(cmap_id, '_generateColorRamp',
             1,5,1);
   call send(cmap_id, '_putCmap');

These lines are written to the Message window:

Colormap object:
   Colormap contains 5 [R,G,B] entries
 [  0,  0,  0]
 [  0, 64,  0]
 [  0,128,  0]
 [  0,192,  0]
 [  0,255,  0]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.