changed g calculation in RGBtone to float precision