CDATA green = BASE_COLOR_GREEN; CDATA blue = BASE_COLOR_BLUE; CDATA red = BASE_COLOR_RED;
Compute a color that is halfway from blue to green. (if the total distance is 100, then 50 is half way).
CDATA blue_green = ColorAverage( blue, green, 50, 100 );
Compute a color that's mostly red.
CDATA red_blue_green = ColorAverage( blue_green, red, 240, 255 );
Iterate through a whole scaled range...
int n; for( n = 0; n < 100; n++ ) { CDATA scaled = ColorAverage( BASE_COLOR_WHITE, BASE_COLOR_BLACK, n, 100 ); // as n increases, the color slowly goes from WHITE to BLACK. }