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 ; This model was created as part of the project: ; PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN ; CLASSROOMS. The project gratefully acknowledges the support of the ; National Science Foundation (REPP program) -- grant number REC #9814682. ; Copyright 2001 by Uri Wilensky. All rights reserved. ; Permission to use, copy, or modify this software and its documentation for ; educational and research purposes only and without fee is hereby granted, ; provided that this copyright notice and the original authors' names appear ; on all copies and supporting documentation. For any other uses of this ; software, in original or modified form, including but not limited to ; distribution in whole or in part, specific prior permission must be ; obtained from Uri Wilensky. These programs shall not be used, rewritten, ; or adapted as the basis of a commercial software or hardware product ; without first obtaining appropriate licenses from Uri Wilensky. We make no ; representations about the suitability of this software for any purpose. It ; is provided "as is" without express or implied warranty. @#$#@#$#@ CC-WINDOW 10 347 305 451 Command Center BUTTON 24 25 140 55 go go T 1 T OBSERVER SLIDER 168 18 295 51 hue hue 0.0 1.0 0.0 0.01 1 SLIDER 168 61 295 94 saturation saturation 0.0 1.0 0.0 0.01 1 SLIDER 168 104 295 137 brightness brightness 0.0 1.0 0.0 0.01 1 SLIDER 167 214 294 247 rgb-red rgb-red 0.0 1.0 0.0 0.01 1 SLIDER 167 257 294 290 rgb-green rgb-green 0.0 1.0 0.0 0.01 1 SLIDER 167 300 294 333 rgb-blue rgb-blue 0.0 1.0 0.0 0.01 1 MONITOR 19 89 144 138 Color in top half hsb-color 5 1 MONITOR 18 284 143 333 Color in bottom half rgb-color 5 1 GRAPHICS-WINDOW 321 10 761 450 5 5 40.0 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 1.0 Beta 6e @#$#@#$#@ @#$#@#$#@ @#$#@#$#@