Fast color manipulation

You still didn’t remove the division. Also, floating point math is slower than integer math (my final version of the method does not even include floating points or division).

Oh so that was your goal. I speculated something that I now forgot. Oh well. My mistake.

[quote]The next step is to figure out how we are going to go about replacing the division sequence for rgb. You were suggested other means of doing this manipulation. I am sorry to say there is no other optimization you can do with normalizing to 0-1 to multiply. Maybe the >>> 8 and 256 has the answer you are seeking.
[/quote]
I showed OP the dividing way. Basically all I contributed in that amount of words is: use >>>, I reduced the amount of bitwise operators from OP’s method, and clarified and linked resources about formatting and perfecting. I also gave a good function to work off solving replacing the big part, being dividing. I was late to posting this post really, because I clarified what was going on - solving that nasty division.