Third of a Circle

Hello! I've been working on a project, and encountered a very specific scenario which I need a very specific block for. However, I have no clue where to even begin when it comes to making it.

I would prefer avoiding exactly what the scenario is, but I'll explain what the block needs to do, if anyone wants to help.

Basically, given the radius and a RGB color value, I need to return a costume of a circle of said color and radius. However, this circle needs to be a third of a circle, kind of like this:


The center of the costume doesn't really matter, as I can adjust it manually. However, I need the circle to have the full hitbox of a full circle of that radius.

The color needs to be filled in with the specified color, and what isn't filled in should be completely transparent pixels. Basically, this is so the touching block detects the full circle radius, rather than just the third of it, but it doesn't hide anything behind it.

There are a few extremely important limitations with this. It can't use the pen tool, as it's used elsewhere in the project, and it can't use Javascript, as I don't want to make the player go into the code and enable it to play.

Does anyone think they could help out? If so, it would be greatly appreciated.

https://snap.berkeley.edu/snap/snap.html#present:Username=mark4sisb&ProjectName=Third%20Circle
I created a third of a circle costume with an (almost completely) transparent hitbox in the shape of a circle and saved it in a variable. My block just changes the colour of the costume and reports it:
untitled script pic (12)
The colour input can also take a list:
untitled script pic (13)
These scripts will not be importable into Snap! because of the size of the costume. In the project I have also included a script to allow you to test the hitbox.

For some reason I thought the variable was actively being used, didn't realize it was just a constant XD

One thing I would like to ask about is the list. That's a really, really big list. Is all of that truly necessary for the block to work? Due to that list, your project for the single block is about 2.5 times the size of the entire game that I've made, where it would be used.

Also, the whole thing of it being any radius isn't truly necessary, if it makes a difference. It only needs to be a 48 by 48 circle, or 24 radius.

Alright, I've updated the project to be 48x48, and that decreased project size dramatically. Good luck!

That is significantly better! Still more than expected, but not unreasonable by any means. Would I have your permission to use this in my project? I'll make sure to credit you in the description.

It looks to me like you want a costume that is a third of a circle, and you want to be able to change the color of it, without changing the size at all. Why don't you just create the third of a circle costume, color it red, then use the snap graphics effects blocks to recolor it? Why bother generating it if it's not going to change at all? Plus, if you need to change the radius, you can change the sprite size.

That was the plan. But I needed the original image to use, and this will definitely work. (Also, the colors are pretty specific, and I have no clue how I would use the graphic effects to recolor it correctly.)
Although, now that I think about it, I don't even need the block in the game, I can just export the costumes XD

If you set the costume to full red, you can set the color (hue), saturation, and brightness effects, and the costume should be that exact color. Of course you'd still have to convert rgb to hsl to get the righy colors, but the colors and crayons library can do that for you.

I suppose that would work. But doesn't using the graphic effects already just generate a new costume? The costumes are pretty small, so it doesn't really take up much space, so I'd rather just use three costumes of the colors I need instead of one costume and do a bunch of stuff with graphic effects.

The graphic effects are realtime, so they don't create a new costume. And plus, the actual image manipulation is done in javascript, so it's a lot faster then what you'd get in snap.