Changing the color of a sprite

How do I change the color of a sprite to a specific color I want?

I usually set the initial costume colour to red (which is color = 0) and then change its color value (in the range 0 - 200) to the colour I'm after

Yeah but that's the thing I don't know how to do that...

[edit] You have to make the inital colour of the costume to red for this to work


yeah but that would take hours to find the exact color I want ;-; but ok...

All you need is the HSL representation of the colour. The colour effect is the hue, which is why the sprites is red. The brightness effect is the brightness times two minus 100, and the saturation effect is 100 less than the saturation.

How would it take hours for you to find the exact color you want? There's only 200 color values, just change the hue by something like 5 until you get what you want.

That's exactly my point tho

Use binary search: start with 100, then 50 or 150, etc.

You don't have to start with red; hue numbers wrap around. And they go up to 100.

But that reminds me that I should add a fair-hue-based color effect block to the Colors and Crayons library!

You can also just do untitled script pic to make the sprite draw a red line, and use the eyedropper in the costume editor to draw the sprite in the right color. The eyedropper tool can actually be used anywhere inside the Snap! window.

if you change it by 5 you will only have to click the block 40 times to wrap around. and it may take around half a second to click the block, analyze the color, and decide if it's the color you want or not. so going all around the color wheel would only take around 20 seconds.

extract of (pages 123 to 129) :

Import the color library
color 20 = red

it only changes the color of the sprite if it is the turtle costume.

@FUNTIME_FOXY101 that only works if it's the turtle costume, since the turtle's color is dependent on the pen color.


use a color picker - try to find one on snap since you are penalty blocked

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.