Massive speedup in common case where rgb values are mostly the same