to-report update-colors ask patches [ if self != patch 0 0 [ let hh towardsxy 0 0 / 360 * 255 let bb distancexy 0 0 / max-pxcor * 1 * 255 ;;let ss abs sin (( tt * .125 - int (tt * .125)) * 360) set pcolor pick-hsb hh saturation bb ] ] tick report true end to-report pick-hsb [ hh ss bb ] report ifelse-value ( approximate? ) [ approximate-hsb hh ss bb ] [ hsb hh ss bb ] end @#$#@#$#@ GRAPHICS-WINDOW 185 10 615 461 17 17 12.0 1 10 1 1 1 0 1 1 1 -17 17 -17 17 1 1 0 ticks CC-WINDOW 5 475 624 570 Command Center 0 SLIDER 5 40 177 73 saturation saturation 1 255 126 1 1 NIL HORIZONTAL MONITOR 5 75 95 120 NIL update-colors 3 1 11 TEXTBOX 5 5 170 31 Move slider to change saturation of color wheel. 11 0.0 1 SWITCH 10 195 137 228 approximate? approximate? 1 1 -1000 TEXTBOX 10 130 160 186 Change \"approximate?\" to switch between netlogo color space mode (on) and full-color mode (off). 11 0.0 1 @#$#@#$#@ == WHAT IS IT? == An HSB color-wheel demo An HSB color model color wheel Copyright (C) 2005 James P. Steiner @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 @#$#@#$#@ NetLogo 4.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@