<blocksapp="Snap! 7, https://snap.berkeley.edu"version="2"><block-definitions="$brush set pen %'dimension' to %'value' %'more value'"type="command"category="pen"><commentw="265.3333333333333"collapsed="false">This block allows you to set the pen's color, transparency (on a scale from 0=opaque to 100=invisible), or size (in pixels). The color can be set in many ways, including RGB values, HSV values, HSL values, fair HSV or HSL (based on a modified spectrum that gives each spectral color equal space and promotes brown to a color), color number, crayon, or X11/W3C color name.

See Appendix A in the Snap! Reference Manual for details.</comment><header></header><code></code><translations>ca:$brush fixa el _ del llapis a _ _
</translations><inputs><inputtype="%s"readonly="true"><options>color
color number
crayon
fair hue
~1
size
transparency
X11/W3C name
~2
(3D color spaces)={
fair HSL={
fair hue
fair saturation (HSL)
fair lightness
fair HSL vector
}
fair HSV={
fair hue
fair saturation (HSV)
fair value (brightness)
fair HSV vector
}
HSL={
hue
saturation (HSL)
lightness
HSL vector
}
HSV={
hue
saturation (HSV)
value (brightness)
HSV vector
}
RGB (0-255)={
red
green
blue
RGB(A) vector
RGB(A) hex
}
}</options></input><inputtype="%s"><options>§_ext_clr_numbers</options></input><inputtype="%mult%s"></input></inputs><script><custom-blocks="✐ initialize variables"></custom-block><blocks="doRun"><blocks="reportAttributeOf"><blocks="reportListItem"><blocks="reportListIndex"><blockvar="dimension"/><blockvar="✐ dimension names"/></block><blockvar="✐ dimension dispatch"/></block><blocks="reportGet"><l><option>self</option></l></block></block><list><blockvar="value"/><blockvar="more value"/></list></block></script><scripts><commentx="460.0888671875"y="4175.599999999967"w="251.33333333333334"collapsed="false">Note to myself: When the user sets a fair dimension, say fair HSL, variable HSL contains the corresponding "unfair" values, and "raw HSL" contains the numbers the user actually gave. It has to be this way because in the case of HSV, there is no "HSV" variable; rather, we use the pen's actual remembered-by-Javascript color's HSV coordinates. So our HSL variable has to be analogous to that. In both cases "raw" means the numbers the user gave us.</comment></scripts></block-definition><block-definitions="mmap %'function' over %'lists'"type="reporter"category="lists"><header></header><code></code><translations></translations><inputs><inputtype="%repRing"></input><inputtype="%mult%l"></input></inputs><script><blocks="doIf"><blocks="reportListIsEmpty"><blocks="reportListItem"><l>1</l><blockvar="lists"/></block></block><script><blocks="doReport"><blocks="reportNewList"><list></list></block></block></script></block><blocks="doReport"><blocks="reportCONS"><blocks="evaluate"><blockvar="function"/><blocks="reportAtomicMap"><blocks="reifyReporter"><autolambda><blocks="reportListItem"><l>1</l><l/></block></autolambda><list></list></block><blockvar="lists"/></block></block><custom-blocks="mmap %repRing over %mult%l"><blockvar="function"/><blocks="reportAtomicMap"><blocks="reifyReporter"><autolambda><blocks="reportCDR"><l/></block></autolambda><list></list></block><blockvar="lists"/></block></custom-block></block></block></script></block-definition><block-definitions="✐ update HSL"type="command"category="other"><header></header><code></code><translations></translations><inputs></inputs><script><blocks="doDeclareVariables"><list><l>L</l></list></block><blocks="doIf"><blocks="reportNot"><blocks="reportEquals"><blockvar="✐ last set as"/><l>HSL</l></block></block><script><blocks="doSetVar"><l>✐ HSL</l><blocks="reportMap"><blocks="reifyReporter"><autolambda><blocks="reportProduct"><l></l><l