Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Setting color of white sprites
- LeadToGold
- Scratcher
96 posts
Setting color of white sprites
I have a number stamper (costumes representing digits 0 - 9)
They need to stamp on a black background so I made them white.
Periodically I want to color a letter so I use:
This has no effect on the color of the white letter.
The brightness effect does work - turning the letter gray. As follows:
And black letters can be colored by bumping the brightness and setting the color.
Am I doing something wrong?
s
They need to stamp on a black background so I made them white.
Periodically I want to color a letter so I use:
set [color v] effect to (x)
This has no effect on the color of the white letter.
The brightness effect does work - turning the letter gray. As follows:
change [brightness v] effect by (-25)
And black letters can be colored by bumping the brightness and setting the color.
Am I doing something wrong?
s
set (TheQuestion) to <<(2b) = [0]> or <not <(2b) = [0]>>>
- LeadToGold
- Scratcher
96 posts
Setting color of white sprites
More info.
Any color selected on the top row, the greyscale colors(except black) exhibits this behavior.
Colors in the lower section can be altered both in color and brightness.
It's a bit inconvenient. I can set the costume to another color and bump up the brightness to white, but my experience is that graphic effects greatly slow down the sprite stamping process.
s
Any color selected on the top row, the greyscale colors(except black) exhibits this behavior.
Colors in the lower section can be altered both in color and brightness.
It's a bit inconvenient. I can set the costume to another color and bump up the brightness to white, but my experience is that graphic effects greatly slow down the sprite stamping process.
s
Last edited by LeadToGold (Dec. 3, 2013 06:55:52)
set (TheQuestion) to <<(2b) = [0]> or <not <(2b) = [0]>>>
- andre_rifaut_tests
- Scratcher
90 posts
Setting color of white sprites
Why not to have two cotumes: one that is white and another in red. With the red you can change color and select any color. With the one, you can go to grey.
- LeadToGold
- Scratcher
96 posts
Setting color of white sprites
Why not to have two cotumes: one that is white and another in red. With the red you can change color and select any color. With the one, you can go to grey.
This is certainly a workaround - cumbersome, but possible. I was hoping there would be another solution.
set (TheQuestion) to <<(2b) = [0]> or <not <(2b) = [0]>>>
- ErnieParke
- Scratcher
1000+ posts
Setting color of white sprites
If you're using a white letters, then there isn't. When you change the color of an object, you're simply shifting where the red, green, and blues in the RGB color lie. With a white object, every color is already maxed, so there's not any room to change the color. With black, there's no color to shift around, so it stays black. So, your best option CPU-wise would be to do what andre_rifaut_tests recommended.Why not to have two cotumes: one that is white and another in red. With the red you can change color and select any color. With the one, you can go to grey.
This is certainly a workaround - cumbersome, but possible. I was hoping there would be another solution.
Although I have thought of another possibility that uses less costumes. I might as well share it. Instead of having only whites letters, have red ones. Then, when you want to stamp a white letter, set the brightness to 100 until you want to stamp in color. Then you can set brightness to 0 and the color to whatever you want. It only requires one more graphic effects block, and it's not used often. What do you think?
Sharing,
ErnieParke
- LeadToGold
- Scratcher
96 posts
Setting color of white sprites
Thanks Ernie.
Black letters actually can be colored. - only the gray scale and white ones can't.
Using single colored red letters is an option but I have found that stamping with color effects on is much slower. Since most of my characters need to be white this would be a drag on my system.
I think I'll go with the two sets of costumes.
Thanks all.
s
Black letters actually can be colored. - only the gray scale and white ones can't.
Using single colored red letters is an option but I have found that stamping with color effects on is much slower. Since most of my characters need to be white this would be a drag on my system.
I think I'll go with the two sets of costumes.
Thanks all.
s
set (TheQuestion) to <<(2b) = [0]> or <not <(2b) = [0]>>>
- FlyBoyAce2
- Scratcher
9 posts
Setting color of white sprites
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–
Last edited by FlyBoyAce2 (Dec. 5, 2022 09:05:39)
when I receive [On v]
go to [Scratch.mit.edu v]
when [FlyBoyAce2 v] activated
forever
add [Code Scratch] to [Coding Languages v]
add [Code Python] to [Coding Languages v]
add [Code HTML5] to [Coding Languages v]
print[Programme, Programme, Programme]
stop [All v]
- Discussion Forums
- » Help with Scripts
- » Setting color of white sprites