get color function working with linear scale of colors