Difference between revisions of "Dynamic Colors"

From GeoGebra Manual
Jump to: navigation, search
m (fixed typo cour->color)
m
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects|advanced}}
{{objects|advanced}}
+
In GeoGebra, you can change the objects' colour using the ''Colour'' tab of the [[File:Menu-options.svg|link=|16px]] [[Properties Dialog]]. The colour of an object can also be set to change dynamically: open the [[File:Menu-options.svg|link=|16px]] ''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''.
In GeoGebra, you can change the color of objects using tab Color of the [[Properties Dialog]]. However, you can also have the color of an object change dynamically: Open the Properties Dialog for a certain object whose color you would like to change and click on tab Advanced. There you will find a section called Dynamic Colors with text boxes for the color components Red, Green, and Blue.
+
 
 +
{{Note|<div>
 +
* The RGB values of the main colours are displayed to the right of the ''Preview'' box in the ''Colour'' tab of the [[File:Menu-options.svg|link=|16px]] ''Properties Dialog''.
 +
* Dynamic colours can also be defined entering a function with range [0,1].</div>}}
  
{{Note|In each of these text boxes, you can enter a function with range [0, 1].}}
 
 
{{Example|
 
{{Example|
* Create three [[Slider Tool|slider]] a, b, and c with an interval from 0 to 1.
+
* Create three [[Slider Tool|sliders]] a, b, and c with an interval from 0 to 1.
* Create a polygon whose color should be influenced by the slider values.
+
* Create a polygon, whose colour will be dynamically related to the sliders values.
* Open the [[Properties Dialog]] for the polygon poly1 and enter the names of the three sliders into the text boxes for the color components.
+
* Open the [[File:Menu-options.svg|link=|16px]] ''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 color component influences the resulting color of the polygon.  
+
* Close the [[File:Menu-options.svg|link=|16px]] ''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 could also animate the sliders with different speeds in order to see the color of the polygon change automatically.}}}}
+
{{note|You may also [[Animation|animate]] the sliders with different speeds, in order to see the colour of the polygon change automatically.}}}}
  
The Dynamic Colors section also contains a text 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.  
+
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 ===
 
=== RGB / HSV / HSL ===
For some dynamic color behaviors it may be easier to use a different color model. In that case instead of default [[w:RGB|RGB]] select either [[w:HSL_and_HSV|HSV]] or [[w:HSL_and_HSV|HSL]] from the drop down list at the bottom of the Dynamic Colors section of the Advanced tab of the Properties dialog.
+
Some dynamic colouring patterns can be obtained using a different colour model. Besides the default [[w:RGB|RGB]], GeoGebra offers two more models, [[w:HSL_and_HSV|HSV]] and [[w:HSL_and_HSV|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 [[File:Menu-options.svg|link=|16px]] ''Properties Dialog''.
{{example|1=To make a point ''A'' go through all colors of the rainbow when moved left and right, switch to HSV mode and let saturation and value be 1 and set hue to <code>x(A)</code>.}}
+
{{example|1=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 <code>x(A)</code>.}}

Latest revision as of 09:28, 23 October 2015


In GeoGebra, you can change the objects' colour using the Colour tab of the Menu-options.svg Properties Dialog. The colour of an object can also be set to change dynamically: open the Menu-options.svg 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 Menu-options.svg 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 Menu-options.svg Properties Dialog for the polygon, then enter the names of the three sliders into the Red, Green and Blue input boxes.
  • Close the Menu-options.svg 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 Menu-options.svg 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).
© 2024 International GeoGebra Institute