Bad color sequence turtle

Can you please send the link to your Repl?

what permissions you want?

None, just the cover page link to your Repl. This guide shows you how to get it.

1 Like

I don’t think RGB accepts floats (decimals). The values must be an integer in the range 0-255.

1 Like

here
https://replit.com/@KadenGerulski/sprial-1
also, I trust u so eh, and either way I have a forked version on my home account

I had changed it to fix it before, and I need to change it again!?

Just convert your values to ints before using them in a drawing function.

t.color((int(r),int(g),int(b)))

dumb it down plz because that doesn’t make sense

dumb it down plz because that doesn’t make sense

When you add to your rgb values, you’re adding a decimal. t.color only supports a tuple with 3 ints inside so 3 decimal numbers won’t work

# round these numbers to 2
r += 1.5
g += 1.5
b += 2.25

so i have to change it again?

so, do I have to change it again to fix it?
I changed it and it didn’t work i even went through and changed them all

do you know how to fix it?

What part doesn’t make sense? An integer in programming is a number without a decimal point. int() converts your r, g, and b values to an integer, meaning gets rid of the decimal points.

I did with same with the other person and it didn’t work but ill try again
still doesn’t work

I did what u and the other person said still doesn’t work
I gave u edit access so u can do what u need to show me why it wont work
I have a copy on my home account so I’m not worried if u screw it up

I tried different things like some of the things that got underlined and what you said and it still doesn’t work
I have some older things and it runs fine it does do a little different stuff but it still kinda the same outcome but the 1 I need help with doesn’t work.
I don’t remember the out come of the other one but ya
this is the one that works will you explain why this one works but the other doesn’t?
https://replit.com/@KadenGerulski/Random-Fun

Okay I fixed it with s.colormode(255). You were getting bad color sequence because the numbers you were adding to r, g, and b were bigger than 1.

The problem is that if it runs for too long it errors out as the colors get larger than 255.

1 Like

that it was that the only problem?