Beginners Interactive NetLogo Dictionary (BIND)
Farsi / Persian
NetLogo Models Library:
Note: If you download the NetLogo application, every model in the Models Library is included.
This model demonstrates the use of groups of commands from version 2.0.0 of the
palette extension. By moving their mouse the user changes the hue of background patches as well as the hue and brightness of nearby turtles. Hue, Saturation, and Brightness are referred to as "components" of the colors.
This model changes the hue, saturation, and brightness of colors by using these primitive groups:
The component of primitive group reports a particular component of an RGB/A or NL color. The model uses this group in the CODE tab to access sepcific components of PAINT-COLOR in the CODE. It uses these commands:
The with component primitive group reports the color with the component changed to number while leaving the other components unchanged. This model uses the command to change the components of PAINT-COLOR in the CODE tab. It uses these commands:
The set component primitive group directly changes the component of a color without the list manipulations (which in the previous versions of the extension were required). In this example, we use the primitives to set the components of an agent's color. The model uses these commands to change the color of turtles and patches:
Color Painting also makes use of NetLogo mouse primitives in the CODE tab to manage mouse input.
For more information on the
palette commands, see the
palette extension documentation.