NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo Models Library:
Code Examples

(back to the library)

HSB and RGB Example

[screen shot]

If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

WHAT IS IT?

This is a simple example of NetLogo colors versus RGB colors using approximate-rgb and approximate-hsb, and hsb.

To use it, simply press GO. The top three sliders specify a color in the HSB spectrum which is displayed in the top half of the world, while the bottom three sliders specify a color in the RGB spectrum which is displayed in the bottom half of the world.

The left side of the world is the approximate NetLogo color equivalent to the specified color, the right half of the world is the actual RGB color. The two monitors show the value of the NetLogo color, in the range of 0 to 140, that is actually displayed.

NETLOGO FEATURES

The origin patch (0,0) is in the corner rather than the center, so the dimensions of the patch grid can be even, so the grid can be divided into four equal quadrants.

(back to the NetLogo Models Library)