private int[] splitToColors(String source){
  if (source == null || source.isEmpty())   return null;
  String[] tokens=source.split("\\|");
  int[] colors=new int[tokens.length];
  for (int index=0; index < tokens.length; index++) {
    colors[index]=Color.parseColor(tokens[index]);
  }
  return colors;
}

private int [ ] splitToColors ( String source ) { if ( source == null || source . isEmpty ( ) ) return null ; String [ ] tokens = source . split ( "\\|" ) ; int [ ] colors = new int [ tokens . length ] ; for ( int index = 0 ; index < tokens . length ; index ++ ) { colors [ index ] = Color . parseColor ( tokens [ index ] ) ; } return colors ; }
split a string in a series of colors .
