Use this procedure to get the RGB triplets associated with a graphics color index.

Syntax


ENVI_GET_RGB_TRIPLETS, Index, R, G, B

Arguments


Index

This is the graphics color index for the desired triplet. The modulo operator that uses the total number of graphics colors is applied to Index prior accessing the color triplets.

R

This is the red color value.

G

This is the green color value.

B

This is the blue color value.

Example


PRO EXAMPLE_ENVI_GET_RGB_TRIPLETS
  compile_opt IDL2  
  ;  
  ; Save the RGB values for 5   
  ; graphics colors into the  
  ; array lookup  
  ;
  lookup = bytarr(3,5)    
  for i=0L,4 do begin    
     envi_get_rgb_triplets, i+2, r, g, b    
     lookup[0,i] = [r,g,b]  
  endfor  
  ;  
  ; Print the resulting array  lookup  
  ;   
  print, lookup
END

API Version


4.2