ScratchAddons
ScratchAddons copied to clipboard
Alpha (Opacity) slider in costume editor.
Currently, there are only color, brightness and saturation sliders in the color picker. I suggest adding a new one for alpha (or opacity). In vanilla scratch the only way to get semi-opaque pixels is using bucket fill option and selecting a gradient between no color and a fully opaque color. This creates major headaches if you want a large section of the same opacity as you have to copy the pixel that has the opacity you want to create a large section of those pixels.
An example of opacity in the costum editor created with the bucket fill gradient method.
Hmm, I've tried this before
The existing colour picker addons simulate a colour picker selecting a specific colour, but this only works for opaque values
I think I tried messing with redux a bit, but it seems scratch-paint explicitly checks for valid 6-digit hex colours (i.e. no transparency)
However, I know that with imported SVG costumes, the colour picker does support transparency when you select a shape with a translucent stroke/fill, so maybe not all hope is lost?
@SheepTester Not all hope is lost, because scratch does support transparent SVGs. In fact, I was able to create my own, from selecting a shape in a costume, and changing its properties through Redux. And in the "scratch-paint/select/CHANGE_SELECTED_ITEMS" event, you will get a selectedItems
array. And... As you can see, it has tons of things that we can edit...
I once remembered seeing a transparency value, so let's see where that is...
And look what we have here...
So it's actually quite simple, but the hard part, is getting the UI right... Before when I was trying to make this addon... I had all the code down, but the UI was just an input that get's appended to the screen where the rest of the tools are. So maybe there is a better way? But an input would also work...
So it's not possible to set your pen color in bitmap mode to something transparent? I don't know much about redux but is it not possible to change the state required without going through the scratch reducer? It's a shame, I mainly wanted this for use with bitmap.
So it's not possible to set your pen color in bitmap mode to something transparent? I don't know much about redux but is it not possible to change the state required without going through the scratch reducer? It's a shame, I mainly wanted this for use with bitmap.
I wish it was that easy, but scratch checks the values set before drawing and removes an opacity it sees.
Bitmap does have rudimentary support for transparency it seems; just not for strokes

I think this is fine since the fill tool works, but users might continually report the behaviour of the pen etc. as a bug
For the record: This suggestion is highly anticipated. Hundreds of (duplicate) website feedback, Discord suggestions, Scratch comments have already been made. This suggestion is amplified that it is already implemented in TurboWarp.