change the way colors are calculated in API