color - returns the color id of a color
color returns the color id corresponding to its argument:
If the requested color does not exist in the current colormap it is added to the colormap.
This function can be used to specify the foreground or background colors when plotting.
x=linspace(-2*%pi,2*%pi,100)'; // using existing colors plot2d(x,[sin(x),cos(x)],style=[color("red"),color("green")]); // new colors: there are added to the colormap e=gce(); p1=e.children(1); p2=e.children(2); p1.foreground=color("purple"); p2.foreground=color("navy blue"); // using RGV values p1.foreground=color(255,128,128);
colormap , color_list , getcolor ,