Had to update the test scripts to handle the alpha channel, also I note
that all the hex tests are using CSS notation, not scratch notation
(which is 0x not #)
Also, fix a math error in `Color.rgbToHsv`.
Newly covered functions:
- `toRbgColorObject` from `util/cast.js`
- `hsvToRgb` from `util/colors.js`
- `rgbToHsv` from `util/colors.js`
- `mixRgb` from `util/colors.js`
These blocks implement pen features as found in Scratch 2.0
Supporting changes include:
- `Target` is now an event emitter
- `RenderedTarget` now emits an event when it moves
- `Target` can now store arbitrary "extra" data, called "custom state"
in the code, using a `Target`'s `setCustomState` and `getCustomState`
methods. This is used to store per-target pen state without requiring
`Target` or `RenderedTarget` to know anything about the pen.
- `Cast` can now cast to an RGB color object.
- `Color` now has functions to convert between RGB and HSV, constants
for for black & white, and a `mixRgb` function to lerp between two
colors.
* Fill out color utilities
* Amend Color.decimalToHex name
* Add `Cast.toScaledRgbColor`
* Add touching color, color touching color blocks
* Fix scale of Cast.toRgbColor
* Fix format of colors to use renderer-style lists
* Update `Color.decimalToRgb`
* Lint self
* Fix SB2 variable imports!
* Fix expectedArg field types
* motion_pointindirection uses math_angle
* Fix "think for secs" expected input
* Add handling for empty input case (empty if-else, for example)
* Fix opcodes for if_else, repeat_until, set tempo
* Specialized number fields for SB2 import
* Convert color picker numbers to hex in SB2 import
* KEY_OPTIONS -> KEY_OPTION
* Backdrop blocks get BACKDROP
* Update toolbox XML to match naming changes
* Merge in math_angle case
* Move color converter to its own utility
* Fix merge conflicts
* Add negative color check.
* Fix keyoptions naming
* Pen JSON tweak post-scratch-blocks update