Colors are numbers. rgb(r, g, b) is a system expression returning a number with all three color values stored in it. Text variables won't work!
Also, you can't use an expression for the initial value of an event variable yet, right now it has to be either a single number or text. So just do: start of layout - set text color to rgb(red_value, green_value, blue_value).