allow one int of difference between js and c++ rgb comparision - fixes a few tests after 830e99afdce7485f8a3aee1ed1a145220109faaa
fix cast from double to unsigned to round predictably