Commented code example (tested as column display code for Columns UI, NG playlist):
// str: input string
$puts(str,%title%)
// find position of first opening parenthesis ( or bracket [ in str
$puts(first_parenthesis,$max($strstr($get(str),' ['),$strstr($get(str),' (')))
// if first_paren has non-zero value, cut relevant part (before parenthesis) away from str
// relevant_str then determines the color
$puts(relevant_str,$ifgreater($get(first_parenthesis),0,$left($get(str),$sub($get(first_parenthesis),1)),$get(str)))
// set the red, green and blue color values (0-255 each)
// if color scheme is required, change code here
$puts(rrr,$mod($div($crc32($get(relevant_str)),1),256))
$puts(ggg,$mod($div($crc32($get(relevant_str)),1000),256))
$puts(bbb,$mod($div($crc32($get(relevant_str)),1000000),256))
// set color
// display str
$rgb($get(rrr),$get(ggg),$get(bbb))
$get(relevant_str)