In many MATLAB plotting functions, you can specify the color as either a string or as a 3 element vector that directly lists the red, green, and blue values.
For ins
here's a oneliner you don't have to solve for C:
str2rgb=@(x)get(line('color',x),'color');
Now str2rgb gives you the answer. for example str2rgb('c') = [0 1 1].
str2rgb
str2rgb('c') = [0 1 1]