Dynamic Colors

GeoGebra Objects

In GeoGebra, you can change the objects' colour using the Colour tab of the Properties Dialog. The colour of an object can also be set to change dynamically: open the Properties Dialog of the object whose colour you would like to define, then select the Advanced tab. The Dynamic Colours sections contains three input boxes which allow you to enter the main colour's components: Red, Green, and Blue.

Note:
• The RGB values of the main colours are displayed to the right of the Preview box in the Colour tab of the Properties Dialog.
• Dynamic colours can also be defined entering a function with range [0,1].
Example:
• Create three sliders a, b, and c with an interval from 0 to 1.
• Create a polygon, whose colour will be dynamically related to the sliders values.
• Open the Properties Dialog for the polygon, then enter the names of the three sliders into the Red, Green and Blue input boxes.
• Close the Properties Dialog and change the values of the sliders in order to find out how each colour component influences the resulting colour of the polygon.
Note: You may also animate the sliders with different speeds, in order to see the colour of the polygon change automatically.

The Dynamic Colours section also contains an input box which allows you to change the Opacity of the selected object. You can enter a number ranging in [0,1] (where 0 means transparent, and 1 means 100% opaque), as well as a slider, in order to obtain a dynamic opacity. Other numbers will be ignored.

RGB / HSV / HSL

Some dynamic colouring patterns can be obtained using a different colour model. Besides the default RGB, GeoGebra offers two more models, HSV and HSL, that can be selected in the drop down list displayed at the bottom of the Dynamic Colours section of the Advanced tab of the Properties Dialog.

Example: To make a point A go through all the colours of the rainbow when moved left and right, switch to HSV mode, then set Saturation and Value to 1, and Hue to `x(A)`.
• GeoGebra
• Help
• Partners