specifying color by RGB

In setting colors for GAUSS graphics, what is the syntax for specifying a color by its RGB values? All of the examples that I saw (e.g. PlotSetLineColor) give examples where the color is named, like "red" or "black", The documentation says that the argument specifying color is a string array either naming a color or its RGB values, but I can't seem to hit on whether it should be something like "191 87 0" or "191" $| "87" $| "0" or something else.   I can see how to do this in preferences, but it's a lot easier to set this via code.


1 Answer


In GAUSS you can use hex codes to specify colors in addition to the named colors. You can find colors by hex values or use an RGB to Hex converter like this site.

For example if you want to use rgb(102, 194, 165), the equivalent hex code is #66c2a5.

x = rndn(100, 1);
y = rndn(100,1);

struct plotControl myPlot;
myPlot = plotGetDefaults("scatter");
plotSetLineColor(&myPlot, "#66c2a5");

plotScatter(myPlot,x, y);

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy