Libraries‎ > ‎Library‎ > ‎Images‎ > ‎

Import patch colors

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Import patch colors from an image file.

End description

Import patch colors

Begin NetLogo code:

substitute-text-area-for image-file-name NetLogoData/yourfilehere.png
  task [import-pcolors "image-file-name"]

End NetLogo code

WARNING! This code will run after everything else scheduled for this time due to the need to run in the observer context. If you want to run micro-behaviours that read the imported colors they must be delayed by any amount (less than 1.0 is recommended).

Please note that for this to run in an applet the image needs to be uploaded to the server. Please send any such files to

BehaviourComposer: ignore everything after this.