globals [HSB-color RGB-color ] to go set HSB-color hsb hue saturation brightness ; color specified in HSB spectrum ask patches with [pycor > 0] ; is displayed in the top half [set pcolor HSB-color] set RGB-color rgb rgb-red rgb-green rgb-blue ; color specified in RGB spectrum ask patches with [pycor <= 0] ; is displayed in the bottom half [set pcolor RGB-color] end @#$#@#$#@ GRAPHICS-WINDOW 306 10 756 481 5 5 40.0 1 10 1 1 1 CC-WINDOW 4 287 299 391 Command Center BUTTON 11 17 127 50 go go T 1 T OBSERVER T SLIDER 155 10 282 43 hue hue 0.0 1.0 0.0 0.01 1 NIL SLIDER 155 53 282 86 saturation saturation 0.0 1.0 0.0 0.01 1 NIL SLIDER 155 96 282 129 brightness brightness 0.0 1.0 0.0 0.01 1 NIL SLIDER 155 155 282 188 rgb-red rgb-red 0.0 1.0 0.0 0.01 1 NIL SLIDER 155 198 282 231 rgb-green rgb-green 0.0 1.0 0.0 0.01 1 NIL SLIDER 155 241 282 274 rgb-blue rgb-blue 0.0 1.0 0.0 0.01 1 NIL MONITOR 6 81 131 130 Color in top half hsb-color 5 1 MONITOR 6 225 131 274 Color in bottom half rgb-color 5 1 @#$#@#$#@ WHAT IS IT ---------- This is a simple example of the HSB (hue, saturation, brightness) and RGB (red, gren, blue) primitives. 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 screen, while the bottom three sliders specify a color in the RGB spectrum which is displayed in the bottom half of the screen. The two monitors show the actual NetLogo color, in the range of 0 to 140, that is actually displayed. @#$#@#$#@ default true 0 Polygon -7566196 true true 150 5 40 250 150 205 260 250 @#$#@#$#@ NetLogo 2.0beta4 @#$#@#$#@ set hue 0.32 set saturation 0.25 set brightness 0.41 set rgb-red 0.57 set rgb-green 0.33 set rgb-blue 0.84 go @#$#@#$#@ @#$#@#$#@