public void setColorRange ( int firstIndex , int lastIndex , int color1 , int color2 ) { for ( int i = firstIndex ; i <= lastIndex ; i ++ ) map [ i ] = ImageMath . mixColors ( ( float ) ( i - firstIndex ) / ( lastIndex - firstIndex ) , color1 , color2 ) ; }
Set a range of the colormap interpolating between two colors .