SetColor Command

Globe.png

This command differs among variants of English:

  • SetColor (US)

  • SetColor (UK + Aus)

SetColor( <Object>, <Red>, <Green>, <Blue> )

Changes the color of given object. The red, green and blue represent amount of corresponding color component, 0 being minimum and 1 maximum. Number t exceeding this interval is mapped to it using function \(2\left|\frac{t}2-\mathrm round\left(\frac{t}2\right)\right|\).

SetColor( <Object>, <"Color"> )

Changes the color of given object. The color is entered as text, that may be:

  • an English color name (see the list of colors). Some of them can be also used in national languages and are listed below.

If you use this command in a GeoGebraScript, you must use the English color names

SetColor(text1, "#80FF0000") sets the color of existing text1 as red, with a 50% white transparency.