protected OMColor[] createColors(int num_colors, int adjustment){
protected OMColor[] createColors(int num_colors, int adjustment) { if (num_colors == 0) { num_colors = 216; }
    protected OMColor[] createColors(int num_colors, int adjustment){        OMColor[] tempColors = new OMColor[num_colors];        int ncolors = NUM_ELEVATION_COLORS;        // How many versions of each color to make up, for sloping        int num_loops = 1;        int modifier = (5 - adjustment)*4;        int red, green, blue;        // Re-adjust the number of colors to match the number of colors        // available.        if(num_colors >= NUM_ELEVATION_COLORS*3){            ncolors = NUM_ELEVATION_COLORS*3;            num_loops = 3;        }        else if(num_colors >= NUM_ELEVATION_COLORS*2){            ncolors = NUM_ELEVATION_COLORS*2;            num_loops = 2;        }                      tempColors = new OMColor[ncolors];        if(Debug.debugging("dteddetail"))            Debug.output("DTEDFrameColortable: Setting number of colors to " +                         ncolors);                for (int j=0; j < num_loops; j++){            if(Debug.debugging("dteddetail"))                Debug.output("dted_raster: Setting round " +                             j + " of colors.");            // Color the 0 index (and the multiples) to be clear water            tempColors[(NUM_ELEVATION_COLORS*j)] = new OMColor(0, 191, 239, 255);            for (int i=1; i < NUM_ELEVATION_COLORS; i++){                switch(j){                case 0:                    red = reds[i]-(20-modifier)/2;                    green = greens[i]-(20-modifier)/2;                    blue = blues[i]-(20-modifier)/2;                    tempColors[i] = new OMColor(opaqueness, red, green, blue);                    break;                case 1:                    red = reds[i]-(20-modifier);                    green = greens[i]-(20-modifier);                    blue = blues[i]-(20-modifier);                    tempColors[i + NUM_ELEVATION_COLORS] =                         new OMColor(opaqueness, red, green, blue);                    break;                case 2:                    red = reds[i];                    green = greens[i];                    blue = blues[i];                    tempColors[i + (NUM_ELEVATION_COLORS*2)] =                         new OMColor(opaqueness, red, green, blue);                    break;                    //  These settings are the original ones, where flat lands get                    //  the original color, and slopes are changed color.  In the                    //  above settings, the positive slope gets the original                    //  color, the level gets a darker color, and the negative                    //  slope gets a twice darker color.//       case 0://      colors_[i].red = reds[i];//      colors_[i].green = greens[i];//      colors_[i].blue = blues[i];//      break;//       case 1://      colors_[i + NUM_ELEVATION_COLORS].red = reds[i]-(20-modifier);//      colors_[i + NUM_ELEVATION_COLORS].green = greens[i]-(20-modifier);//      colors_[i + NUM_ELEVATION_COLORS].blue = blues[i]-(20-modifier);//      break;//       case 2://      colors_[i + (NUM_ELEVATION_COLORS*2)].red = reds[i]+(5);//20-modifier);//      colors_[i + (NUM_ELEVATION_COLORS*2)].green = greens[i]+(5);//20-modifier);//      colors_[i + (NUM_ELEVATION_COLORS*2)].blue = blues[i]+(5);//20-modifier);//      break;                default:                    break;                }            }        }        return tempColors;    }