Scratch-vm: Make the color picker input non-droppable

Created on 16 Oct 2017  路  2Comments  路  Source: LLK/scratch-vm

Expected Behavior

You should not be able to drop into the color picker swatch (but we should continue to support 2.0 projects that use a hex value). /cc @ericrosenbaum for details.

Actual Behavior

Dropping a block onto set color block with color picker causes an error.

Steps to Reproduce

Drop a block into the color picker input.

Operating System and Browser

_Mac, Chrome, https://ericrosenbaum.github.io/scratch-gui/extensions-oct2017/_

bug extensions needs-triage

Most helpful comment

Inputting a hex color in 2.0 is as simple as this:

set pen color to ( (join [0x] [ffffff] ) + (0) )

since "0xffffff" + 0 = 16777215 and the "set pen color to [color]" accepted reporters that reported a decimal color.
I think this behavior should be duplicated in 3.0.

All 2 comments

Why not? There are use cases for setting pen color to a number. All of the projects in https://scratch.mit.edu/studios/1440810/ draw an image by pulling pixel data from a list and setting the pen to that color. Storing/drawing images in this way would be far harder if you had to set hue/saturation/brightness manually

Inputting a hex color in 2.0 is as simple as this:

set pen color to ( (join [0x] [ffffff] ) + (0) )

since "0xffffff" + 0 = 16777215 and the "set pen color to [color]" accepted reporters that reported a decimal color.
I think this behavior should be duplicated in 3.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericrosenbaum picture ericrosenbaum  路  3Comments

CatsAreFluffy picture CatsAreFluffy  路  6Comments

cwillisf picture cwillisf  路  4Comments

towerofnix picture towerofnix  路  5Comments

cwillisf picture cwillisf  路  4Comments