This function converts given r, g, b values into IDL specific colour values.
r
g
b
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