ivec won't work on OpenGL ES 2.0, it will work in 3.0 though - the first Android devices with support for that will arrive soon.

I think it's better to simply multiply the ref values with 255.0f (or 256.0f?) before comparing. A single multiplication is a lot cheaper than an add + floor + multiplication at least.