Okay, here it is:
colors.xml (226.5 KB)
There are six blocks meant for users:
Detailed documentation coming soon, but given Appendix A and the notes below y'all can start debugging this, especially those of you who've been bugging me for it!
The PEN and SET PEN blocks are, sadly, implemented separately from the COLOR FROM and FROM COLOR blocks. The pen remembers how it was last set, and that turns out to be super useful in interpreting what the user means to do next. In particular, FAIR HUE FROM COLOR and CRAYON NUMBER FROM COLOR can give slightly different results from the pen versions. (Well, in the case of the PEN reporter, it'll say "not set" if you ask for a different scale from the one you used to set the pen last.)
Thanks to @cymplecy, the optional pulldown menu inputs in SET PEN and COLOR FROM are different menus depending on the non-optional category pulldown. In particular, the old SET PEN TO CRAYON block is now just one of the choices in SET PEN. Also, if you know the name of your crayon, you can type the name into the input slot and the block will find the crayon number for you, so you don't have to use the pulldown menu.
The menu for crayons includes all 100 possibilities. The ones for color number and fair hue have only a selection, because those are continuous scales, and hardly any of them have names. Those are the only three pulldown menus; if you select category RGB vector or some such, you don't get any pulldown values.
The variadic input at the end of the COLOR FROM block needs explanation. Think of it as a continuation of the slot before it, the one with the pulldown choices. So these are equivalent:
However, there's a difference if you include a transparency:
In the first case, the transparency is separate from the RGB vector, so it's in the usual Snap
! scale of 0=opaque, 100=transparent; in the second case, it's a fourth item of an RGBA vector, so it's on the rest-of-world 0=transparent, 255=opaque scale. You can add a transparency to any kind of color format:
Okay, past my bedtime. @helicoptur, I haven't started thinking about MIX yet; now that I understand that "subtractive" really means multiplicative, I might try to do paint mixing after all.