Navigation
Synopsis Return a color with a given name.
Function
  1. Color color(str name)
  2. Color color(str name, real alpha)
Description Returns color with given name. All HTML/X11 Color Names are supported. When the transparency alpha is given, the color is adjusted accordingly.

The list of available color names is given by colorNames.
Examples
c = color("Red");
b1 = box([size(50), fillColor(c)]);
render(b1);
gives b1 and with only 50% transparency:
c = color("Red", 0.5);
b1 = box([size(50), fillColor(c)]);
render(b1);
gives b2
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.