use ints, compute palette