Okay, so through extensive testing I was able to get to re-colorize my pics or icons to the colors I want. There's just one thing I don't get.

If I load a pixel from memory and I want to recolor it ... right now I convert the pixel's RGB color to HSL. Then no matter what, .... I simply change the hue to whatever color I want to recolor that pixel. For example if my pixel is a shade of green and I want to recolor it to a shade of red, I convert the green's pixel RGB value to its equivalent HSL value. I then change the hue to 0 and reconvert back to RGB and display it. It works like a charm. Now I didn't test all the shades in the color spectrum... so my question is ... what happens when I would have an icon I want to re-colorize to red but contains many shades of green with the following RGB values:

02 - 128 - 00
03 - 128 - 00
04 - 128 - 00
05 - 128 - 00

125 - 128 - 00
126 - 128 - 00
127 - 128 - 00
128 - 128 - 00

If you notice all the above RGB values when converted to HSL, for each one of them the saturation and the luminance stays the same which is 100% and 24% respectively (for windows ranges its 240 and 160 respectfully). The only thing changing is the hue creating a very different shade of green. But if I always set the hue to 0..... then when I reconvert back to RGB.... I will always have the same red color ????? Until now I was able to re-colorize anything because all the pixels have no 0 value in any of the 3 RGB components and so when converting these pixels to hsl, the hue, sat and lum always varies and so setting the hue to 0 works since the sat and lum will keep a certain color saturation and lightness which will keep a relative sat/lum ratio when combined with the altered hue.

If the situation above rises, what are we to do... or does the situation can actually be ignored since shades always have their RGB value greater than 0.

All helpful insight is appreciated.