Netlogo - change shape color - netlogo

Can I change the color of the shape?
It the shape that I have generated as polygon
I tried
crt 1[
set shape "myPoligon" ;works
set heading 0 ;works
set size 10 ;works
set color red ;doesn`t work
]

Check out the shapes manual: https://ccl.northwestern.edu/netlogo/docs/shapes.html#colors
Basically, when designing shapes you can use any color the shape editor provides. Below the color grid you will find a chooser named "Color that changes:". Here you define a color value, that adjusts according to the color variable of the turtle. All other colors of your shape will not change. By default the color "Gray" is selected. That means all "Gray" polygons and lines of your shape will not be displayed gray. Instead the color is defined by the color variable of the turtle. You can also verify this with the preview shapes at the bottom of the shape editor. They switch colors automatically and indicate areas of your shape that can be changed by setting the color variable of a turtle.

Related

How to generate Material Design Color set of selected color programmatically?

Question 1.
Let's assume the selected color is #a85c40.
Now, how can we generate the Material color with some nearby shade from that picked color. The nearby material shade will be like shade 800.
Question 2.
How to generate a colors sets of all colors with shade500 ?
You can use this tool to generate the colors.
You can use the colorScheme: property of the ThemeData() and pass a ColorScheme() object where you can set all the desired properties.
This video explains it https://www.youtube.com/watch?v=ZUi3hppgG2s

How to control the smart light (color , color tempreature, brightness)

If the light is set to Red, and I want to modify the brightness.
But the Color Model(rgb or hsb) isn't support the brightness.same with color tempreature.
What should I do? Need to change to White light Model, then adjust the brightness?
So, you want to change the color and brightness both. If that is what you want to do then you have to implement two separate variables for brightness and color. The brightness cannot be controlled using just rgb or hsv, it uses separate variable and it ranges from 0-100.
Go through this:-
https://developers.google.com/actions/smarthome/traits/colorsetting

HTML5 Color Picker - color not changed

I've noticed a strange behavior with the color picker. When I pick any color from the basic colors (predefined colors), the button's color (the one of the html input element) is changed accordingly.
However, when picking any other color from the the gradient color picker, the button's color won't change. It will stay white. (Note: Don't pick a basic color first or refresh the jsbin page first if you're going to test it)
But... when I first pick a basic color and press OK and then pick a color from the gradient color picker, the button's color will change.
(Tested with Chrome 69)
Video (gif):
https://giphy.com/gifs/8vCEY7uyz8m17N0bkz
Test it:
http://output.jsbin.com/ivAhORu/1
var i = 0;
var inp=document.createElement("input");
inp.type = 'color';
inp.id = 'colo_'+i;
inp.value = '#ffffff';
inp.className = 'datafield';
document.body.appendChild(inp);
It's not actually an error, when you set a color picker to pure white or pure black the luminosity is adjusted to give you the desired color. When you pick a swatch the luminosity is changed to that swatch so it seems like it wasn't working before, but in fact it was working and if you adjusted the luminosity you'd see the color change correctly. You might want to consider a different starting color other than pure black or pure white.

Netlogo: Is it possible to change the size and font of the label attached to a turtle?

I only know the color of the turtle label can be changed. How about the size, position and font(such as if i wanna BOLD it). Thank you
I don't know about position and font. But you can change the size with right-click on the world (where the turtles live) and change the font size there.
Here are some pages that deal with label changes: change label color and another that deals with labels of patches and a model in which the position of the labels is changed.

How can I make each Packed Bubble a different color?

I have a Packed Bubble dashboard. My Y axis is a list of names and my X axis is a decimal. I want each differing number to be a different color. Can I do this manually?
If you want to color each bubble with a separate color just use the field that each bubble represent in the color shelf. If I understood your data correctly, each bubble basically represents one campaign, so you should use that as the color.
You can manually assign color using Color>Edit Color and assigning the color of your choice.
See image 1.
If you want to color your bubbles based on your measure AVg(NPV/Marketing $) you can do as Alex Blakemore mentioned and use your measure as a stepped color or gradient.
You can use Color>Edit Color here too , in this case manually assigning color is a bit difficult. But if you play with number of steps, the gradient pre-select, etc, you can usually get very close to what ever your wanted it to look like.
Put your numeric field on the color shelf, and either edit the colors to use a stepped set of colors - or change the field to be discrete and choose individual colors to taste.