split gradient script
decode color from hex