21     static int r0 = -1, g0 = -1, b0 = -1;
    23     if (v0 == *val && r0 == r && g0 == g && b0 == b)
    25     v0 = *val, r0 = 
r, g0 = 
g, b0 = 
b;
    28         fprintf(fp, 
"%g%% %d:%d:%d\n", 100 * (*val - *min) / (*max - *min), r, g, b);
    30         fprintf(fp, 
"%g %d:%d:%d\n", *val, r, g, b);
    53         for (i = lo; i <= hi; i++) {
    54             unsigned char r, 
g, 
b, 
set;
    57             write_rule(&val, &min, &max, r, g, b, fp, perc);
    63         for (i = 0; i < 
count; i++) {
    65             unsigned char r1, g1, b1, r2, g2, b2;
    70                 colors, count - 1 - i);
    72             write_rule(&val1, &min, &max, r1, g1, b1, fp, perc);
    73             write_rule(&val2, &min, &max, r2, g2, b2, fp, perc);
    80         fprintf(fp, 
"nv %d:%d:%d\n", r, g, b);
    82         fprintf(fp, 
"default %d:%d:%d\n", r, g, b);
 
void Rast_print_colors(struct Colors *colors, DCELL min, DCELL max, FILE *fp, int perc)
Print color table. 
int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *, unsigned char *, DCELL *, unsigned char *, unsigned char *, unsigned char *, const struct Colors *, int)
Get color rule from both modular and fixed rules. 
void Rast_get_default_color(int *, int *, int *, const struct Colors *)
Gets default color. 
void Rast_get_null_value_color(int *, int *, int *, const struct Colors *)
Gets color for null value. 
void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *)
Get color range values (CELL) 
void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors. 
int Rast_colors_count(const struct Colors *)
Get both modular and fixed rules count.