Implemented a flawed compute color function