Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Why is it that for color swap, you are only given ONE option for that? You are only given 1 number, and that changes the whole sprite colors. So basically it's a “guessing game” if I want to for example, change a blue to red on a sprite. But If I want to change the sprite to a very specific color, I have to use a whole new sprite? That doesn't seem to make any sense. I think there should be a way to change a sprite's single color at runtime.
Also, I noticed for the looks, there is (costume (number)), (backdrop (number0), and (size), but there is NO variable block for things like Color? Same goes for the other ‘looks’ options like fisheye, whirl, pixelate, etc. Don't they have their own numbers like how Movement has (X position) (y position) (direction)? Prob a bad example there, but i think you know what I mean.
Yes, I know I can add my own custom variable (thats all the way toward the bottom of the list) to determine ‘looks’ different effects that is color, whirl, fisheye, etc. I guess. Just doesn't feel the same?
From my experience, in other programming languages, you can change a white (R255,G255,B255), into any other color you want. But in Scratch, you really don't have a choice other than a random color cycling variable, other than to use a separate new sprite? Again, doesn't really make any sense for the case if you need like 10+ color variations for the same character
Also, I noticed for the looks, there is (costume (number)), (backdrop (number0), and (size), but there is NO variable block for things like Color? Same goes for the other ‘looks’ options like fisheye, whirl, pixelate, etc. Don't they have their own numbers like how Movement has (X position) (y position) (direction)? Prob a bad example there, but i think you know what I mean.
Yes, I know I can add my own custom variable (thats all the way toward the bottom of the list) to determine ‘looks’ different effects that is color, whirl, fisheye, etc. I guess. Just doesn't feel the same?
From my experience, in other programming languages, you can change a white (R255,G255,B255), into any other color you want. But in Scratch, you really don't have a choice other than a random color cycling variable, other than to use a separate new sprite? Again, doesn't really make any sense for the case if you need like 10+ color variations for the same character

- kittensu
-
53 posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Not sure what you're going at, but; go to events, take a when flag clicked, take a set color to (whatever you want) block in looks, then take a (wait seconds) block and then another set color block to (whatever). That way, when the flag clicked, it will set to (the color you picked) and then after (any seconds) it's another color. Reccomended: Add a wait 1 seconds block after coding all that, and then a set color to 0 block.
That might not be what you meant as it wasn't much precise to me, so I can't give you much info about it. But if you tried to tell me what project you have precisely going for, I could give you more info about it.
That might not be what you meant as it wasn't much precise to me, so I can't give you much info about it. But if you tried to tell me what project you have precisely going for, I could give you more info about it.
Last edited by kittensu (July 3, 2021 19:44:39)
- kittensu
-
53 posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
And if you did precisely mean: why isn't there a color picker, or an option to pick any color you want: heres a tip; as this is in the “help with scripts” form, it may be confusing if you mean you need help with scripts, or not. I'm not sure if you picked for your message to be in the “help with scripts” form, but I suggest you add a note saying it isn't mean to in that form, or just a precise note of what this message topic is. Yes, you did say that in the title, but I think I can give you a little more info if the title was precise of what you needed help with. If you wanted to suggest to scratch for a color picker you can email them, or; etc. You can go to https://scratch.mit.edu/contact-us/ scroll down, click “get help” and scroll down there, too. It will guide you if you wanted to send an email, Or; Chat. You can use the chat bubble within scratch team's account during their support hours.
Last edited by kittensu (July 3, 2021 19:58:57)
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
I posted in help with scripts because I assumed there was a better way to script color change. Not to suggest something. But yea, I would like a precise color picker. I suppose I can post in suggestions for that then,.
- kittensu
-
53 posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Oh i see, and sorry I forgot to note that when you click the button on the contact page, you'll have to scroll down and click another button, I think it says “contact us,” if you wanted to suggest. I posted in help with scripts because I assumed there was a better way to script color change. Not to suggest something. But yea, I would like a precise color picker. I suppose I can post in suggestions for that then,.
- EpicGhoul993
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
That's basically how choosing color works. You can take the color slider in ezgif as an example: you still have the number there. You are only given 1 number, and that changes the whole sprite colors.
Yes, it's a guessing game, just like in others! Also to change blue to red you set color effect to around 80. So basically it's a “guessing game” if I want to for example, change a blue to red on a sprite.
You can try. Color effect and others work okay for me. But If I want to change the sprite to a very specific color, I have to use a whole new sprite? That doesn't seem to make any sense.
Name an engine that let you do that in runtime. I think there should be a way to change a sprite's single color at runtime.
It's being suggested. I noticed for the looks, there is (costume (number)), (backdrop (number0), and (size), but there is NO variable block for things like Color? Same goes for the other ‘looks’ options like fisheye, whirl, pixelate, etc. Don't they have their own numbers like how Movement has (X position) (y position) (direction)? Prob a bad example there, but i think you know what I mean.
Hold your words, and give me a color. From my experience, in other programming languages, you can change a white (R255,G255,B255), into any other color you want. But in Scratch, you really don't have a choice other than a random color cycling variable, other than to use a separate new sprite?
If you need 10+ variations for a thing, it's just better to do with costumes, or in your words, different images. Again, doesn't really make any sense for the case if you need like 10+ color variations for the same character
It all sounds like you are suggesting. I posted in help with scripts because I assumed there was a better way to script color change. Not to suggest something.
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Name an engine that let you do that in runtime..
I'm pretty sure programming software such as Game Maker Studio, Clickteam Fusion has the ability to change the color white into any set color without guessing.. I know this because I wrote a small article on RGB Coefficient colorization, and how it works in the programming language I have used.
The way I am told how precise color change works is through sprite masking. As in, if a character contains 5 colors, each of those colors has their own sprite layer attached to the main character hitbox, dedicated to that single color.. That would mean 1 character has 5 attached sprites..
However,m in Scratch, it is next to almost impossible to change the color White . I have recently put up a color cycling test to show this as to what I am talking about..all the white/grey shades I've noticed still have that grey-ish look.
So like, in Scratch programming you can't change for example, a solid Blue color, into all white due to code block limitations..
- awesome-llama
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
If you make your sprite red, you'll be able to make it any colour you want using HSB:
https://scratch.mit.edu/projects/508112233/
A workaround is needed for saturation, but it is still entirely possible to make.
https://scratch.mit.edu/projects/508112233/
A workaround is needed for saturation, but it is still entirely possible to make.
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Red???? Like, does it ‘HAVE’ to be red? Can it start out blue, or specifically red?
Also, using the Ghost effect doesn't bright or darken the color in question. It just adds toward the “see-through” transparency, hence the name ‘ghost’. So I don't know how that would work in making the color red to white..
Also, using the Ghost effect doesn't bright or darken the color in question. It just adds toward the “see-through” transparency, hence the name ‘ghost’. So I don't know how that would work in making the color red to white..
- EpicGhoul993
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Red???? Like, does it ‘HAVE’ to be red? Can it start out blue, or specifically red?
Also, using the Ghost effect doesn't bright or darken the color in question. It just adds toward the “see-through” transparency, hence the name ‘ghost’. So I don't know how that would work in making the color red to white..
- hedgehog_blue
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Scratch isn't designed to make everything you want possible or easy. It's more focused on simplicity and helping people learn (although the limitations it provides can make it fun for more advanced users too, in my opinion). In fact, for the level of simplicity, the amount of things that are possible with scratch are surprising, even if not everything is as convenient as making them somewhere else.
The graphic effects are designed with this concept in mind. They aren't meant to allow you to dynamically apply any possible effect to the sprite, it's just a small selection of fun effects. This means the color effect is meant to be simple, it just shifts the hues of the sprite as it increases. Like the other graphic effects, it's based on a single continuous input and scaled so that the amount of color change as the number changes is similar for all effects.
You can still make specific changes with color effect, even if it isn't perfect. Because a change of color effect of 200 represents a full cycle through all hues, you can calculate a specific value to achieve a certain color. You can even use a color effect of infinity, whose position on the 0-200 cycle cannot be determined, to completely desaturate the sprite, which can be built upon to achieve any saturation. And if you want to have different color shifts on different parts of a sprite, you can split it into multiple sprites or clones. You can do these things in so many ways: Some people are fine with using multiple costumes, others will work with a system someone else has already made, others will design whole new solutions, maybe using things like the pen.
Most people can find a solution they enjoy for the problems they find in scratch, but it's okay if there are issues for which no solution you can think of appeals to you. Scratch has its pros and cons, and you can base your decision to use it off of how those affect you. Scratch will probably continue to be the way it is, so you'll have to learn to enjoy it within its limitations, or to move on to something else.
The graphic effects are designed with this concept in mind. They aren't meant to allow you to dynamically apply any possible effect to the sprite, it's just a small selection of fun effects. This means the color effect is meant to be simple, it just shifts the hues of the sprite as it increases. Like the other graphic effects, it's based on a single continuous input and scaled so that the amount of color change as the number changes is similar for all effects.
You can still make specific changes with color effect, even if it isn't perfect. Because a change of color effect of 200 represents a full cycle through all hues, you can calculate a specific value to achieve a certain color. You can even use a color effect of infinity, whose position on the 0-200 cycle cannot be determined, to completely desaturate the sprite, which can be built upon to achieve any saturation. And if you want to have different color shifts on different parts of a sprite, you can split it into multiple sprites or clones. You can do these things in so many ways: Some people are fine with using multiple costumes, others will work with a system someone else has already made, others will design whole new solutions, maybe using things like the pen.
Most people can find a solution they enjoy for the problems they find in scratch, but it's okay if there are issues for which no solution you can think of appeals to you. Scratch has its pros and cons, and you can base your decision to use it off of how those affect you. Scratch will probably continue to be the way it is, so you'll have to learn to enjoy it within its limitations, or to move on to something else.
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Oh wait, brightness effect? That makes much more sense! :O
Okay fine then. It;'s STILL a guessing game, but I guess that's fair enough for a HUE/color cycle and a brightness changer.
Okay fine then. It;'s STILL a guessing game, but I guess that's fair enough for a HUE/color cycle and a brightness changer.
- TommyNator11
-
63 posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
sounds like you really like colors Why is it that for color swap, you are only given ONE option for that? You are only given 1 number, and that changes the whole sprite colors. So basically it's a “guessing game” if I want to for example, change a blue to red on a sprite. But If I want to change the sprite to a very specific color, I have to use a whole new sprite? That doesn't seem to make any sense. I think there should be a way to change a sprite's single color at runtime.
Also, I noticed for the looks, there is (costume (number)), (backdrop (number0), and (size), but there is NO variable block for things like Color? Same goes for the other ‘looks’ options like fisheye, whirl, pixelate, etc. Don't they have their own numbers like how Movement has (X position) (y position) (direction)? Prob a bad example there, but i think you know what I mean.
Yes, I know I can add my own custom variable (thats all the way toward the bottom of the list) to determine ‘looks’ different effects that is color, whirl, fisheye, etc. I guess. Just doesn't feel the same?
From my experience, in other programming languages, you can change a white (R255,G255,B255), into any other color you want. But in Scratch, you really don't have a choice other than a random color cycling variable, other than to use a separate new sprite? Again, doesn't really make any sense for the case if you need like 10+ color variations for the same character
- NMario84
-
1000+ posts
Why is there only 'Set (Color) Effect to (#)', and not to a precise color?
Yea I'm being stupid. Sorry. 
Still a bit new to Scratch's programming, so there's some things I have to get used to.
I say it's more or less of a guess trying to be “accurate” to source game graphics when I want to try and recreate something in particular. It's kind of hard to recreate something without a color picker. But I suppose I can manage somehow.

Still a bit new to Scratch's programming, so there's some things I have to get used to.
I say it's more or less of a guess trying to be “accurate” to source game graphics when I want to try and recreate something in particular. It's kind of hard to recreate something without a color picker. But I suppose I can manage somehow.
- Discussion Forums
- » Help with Scripts
-
» Why is there only 'Set (Color) Effect to (#)', and not to a precise color?