fix getting color from gradient