RGB to HEX

if(counting == 1){someFloat = (float) someFloat + 0.1;}

If someFloat is a float, there is no reason to cast it to a float.

int exponent = (int)someFloat; //exponent is the number to the left of the decimal point

The portion on the left of the decimal point is NOT the exponent. Really poor choice of name.

int fraction = (int)(someFloat*10.0); //fraction is the 1st number to the right of the decimal point

Multiplying someFloat by 10, without having removed the integer portion will NOT give you correct results.