RobotStudio event

TCP-trace color change by rapid

Hi, I'm trying to change the TCP-color depending on the color of the pen the robot picked to simulate the writing on a sheet of paper. I know how to activate the TCP trace by a signal but that works only for one signal but I want to change it by the rapid program. Is this possible?  Thanks in advance,
Chris