function cutColor() simplification