Discuss Scratch

The_Game_
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

Is this even possible? I really need to know because I want to make an Ai Evolution thingy.
Edit: I mean I want to make it contain more of a colour when a certain value is higher. (I also want it to work with colours that are not red green and blue too so I have more options)

Last edited by The_Game_ (May 26, 2023 01:31:52)

Spentine
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

You could try to use the
setcoloreffectto0
block.

If I recall correctly, the scale is from 0 to 200.
The_Game_
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

Spentine wrote:

You could try to use the
setcoloreffectto0
block.

If I recall correctly, the scale is from 0 to 200.
That isn't what I meant… I meant multiple values adding more of a certain colour.
legendary34678
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

I don't think you can alter RGB of a sprite directly. Color effect changes the hue of a sprite, so you can have a sprite be completely red and then change the color effect to change its hue. You can also use the brightness effect block to change brightness.
The_Game_
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

legendary34678 wrote:

I don't think you can alter RGB of a sprite directly. Color effect changes the hue of a sprite, so you can have a sprite be completely red and then change the color effect to change its hue. You can also use the brightness effect block to change brightness.
I know that's why I'm asking for a solution.
legendary34678
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

The_Game_ wrote:

I know that's why I'm asking for a solution.
And I provided you with one. Was it satisfactory?

If you want more control, you can opt for simpler pen graphics. You'd have to draw it all yourself (so you could try sticking with circles or simple shapes) but you have control over the exact color of the drawn shape.
The_Game_
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

legendary34678 wrote:

The_Game_ wrote:

I know that's why I'm asking for a solution.
And I provided you with one. Was it satisfactory?

If you want more control, you can opt for simpler pen graphics. You'd have to draw it all yourself (so you could try sticking with circles or simple shapes) but you have control over the exact color of the drawn shape.
Okay, but how do you even get multiple things running around with pen?
legendary34678
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

With pen graphics, you will have to redraw the screen every frame using a custom block (“Run without screen refresh”). You can control movement by tracking position with variables and change in x/y with variables as well. You can use this project as a simple example: Idle Ball Game (Pen Edition).
The_Game_
Scratcher
1000+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

legendary34678 wrote:

With pen graphics, you will have to redraw the screen every frame using a custom block (“Run without screen refresh”). You can control movement by tracking position with variables and change in x/y with variables as well. You can use this project as a simple example: Idle Ball Game (Pen Edition).
I'll try that and tell you how it goes.
09878901234321
Scratcher
500+ posts

How would I make a Sprite change colour with RGB colour values (no costume changing)

I’m on my phone so it was a bit difficult to make, but I made a RGB to color effect project, it doesn’t have sliders though, so you’ll have to see inside.

https://scratch.mit.edu/projects/857281716/

Powered by DjangoBB