From AstroWiki

DR: Rgb

This function converts given r, g, b values into IDL specific colour values.

 function rgb,r,g,b
 ;; usage: color=rgb(r,g,b)
 ;; r, g, b can have values from 0 to 255
   result=1l*r+256l*g+256l^2*b
   return,result
 end

Credit: Roy van Boekel

Retrieved from http://www2.mpia-hd.mpg.de/MIDISOFT/wiki/index.php?n=DR.Rgb
Page last modified on February 18, 2008, at 12:11 CET