Discuss Scratch
- Discussion Forums
- » Suggestions
- » alternating colors for conditions, etc
- Jareddddddd
-
Scratcher
1000+ posts
alternating colors for conditions, etc
Some projects in scratch get very large, and sometimes it's hard to keep track of the many nested if/elses and loops. My suggestion is to alternate the colors of these to things when nested.
For examples:
old coloring:
new coloring:
it helps organize and make code more readable. Maybe a different color than shown, but I do think this is a good addition.
For examples:
old coloring:
if <(canJump) = [true]> then
if <touching [wall v] ?> then
if <key [right arrow v] pressed?> then
if <key [a v] pressed?> then
dash_right ()
else
walljump_right()
end
else
if <key [a v] pressed?> then
dash_left()
else
walljump_left()
end
end
else
change [y v] by (15)
end
else
repeat until <(canJump) = [true]>
change [yvel v] by (-1)
end
end
new coloring:
if <(canJump) = [true]> then
if <touching [wall v] ?> then :: #e1bf1f
if <key [right arrow v] pressed?> then
if <key [a v] pressed?> then :: #e1bf1f
dash_right ()
else
walljump_right()
end
else
if <key [a v] pressed?> then :: #e1bf1f
dash_left()
else
walljump_left()
end
end
else
change [y v] by (15)
end
else
repeat until <(canJump) = [true]> :: #e1bf1f
change [yvel v] by (-1)
end
end
it helps organize and make code more readable. Maybe a different color than shown, but I do think this is a good addition.
Last edited by Jareddddddd (April 10, 2023 17:48:22)
- BlockPoint
-
Scratcher
100+ posts
alternating colors for conditions, etc
This reminds me of Snap!. I believe this is called zebra coloring, and it would be a bit helpful for massive projects. Support!
Also, here's a screenshot of Snap!'s zebra coloring:

(The script shown is random if you were curious)
Also, here's a screenshot of Snap!'s zebra coloring:

(The script shown is random if you were curious)
Last edited by BlockPoint (April 10, 2023 18:35:08)
- Withered_Fredboi
-
Scratcher
100+ posts
alternating colors for conditions, etc
Support! This would make the loops & stuff less confusing.
Last edited by Withered_Fredboi (April 10, 2023 18:58:44)
- k7e
-
Scratcher
1000+ posts
alternating colors for conditions, etc
never mind
Last edited by k7e (April 10, 2023 19:07:54)
- The_Blue_J
-
Scratcher
1000+ posts
alternating colors for conditions, etc
I think this should be added, as the boundaries of nested blocks are hard to find, this should help with this…
- SAVVYSCLUTTER
-
Scratcher
500+ posts
alternating colors for conditions, etc
Support - this would make reading long scripts easier.
Last edited by SAVVYSCLUTTER (April 13, 2023 16:40:38)
- cs2861142
-
Scratcher
100+ posts
alternating colors for conditions, etc
Pretty good idea. I'm pretty sure zebra coloring is already available with Snap! and the not-to-be-named extension. However, this feature being available in scratch would be very helpful, especially for large projects (and it would be easy to implement). Good job!
- Knightbot63
-
Scratcher
1000+ posts
alternating colors for conditions, etc
(#7)Why?
Support!
~~~
It can probably help when coding something big since you may get confused which if-then block is causing an error. Support for the reason stated.I say this support message too many times .-.
Also, forgot to mention that the TurboWarp addons menu has this.
Last edited by Knightbot63 (April 12, 2023 14:26:11)
- hi875230163394
-
Scratcher
1000+ posts
alternating colors for conditions, etc
Please, for the love of god, this is very much necessary
I frequently find myself with long chains of if else code, and it becomes tiring to figure out which loop is which
I frequently find myself with long chains of if else code, and it becomes tiring to figure out which loop is which
- cs3868895
-
Scratcher
1000+ posts
alternating colors for conditions, etc
This is a very interesting suggestion indeed, where do I start.
I wanna argue maybe this would be similar to high contrast mode coming up but this would help with games since they require, many if statements. As for the animator side of this argument, it can help with my blocks and what they do, they are not going to be too bright to bleed my eyes.
actually I think it would be better if we include the my blocks.
Some my blocks are coded differently that we need to have some what of a distinction coloring
https://scratch.mit.edu/projects/834998664/
Last edited by cs3868895 (April 13, 2023 18:27:36)
- Jareddddddd
-
Scratcher
1000+ posts
alternating colors for conditions, etc
So, this topic turned out to be a duplicate(info on dupes here) of 2 topics I found:thanks, Zanter. Ill report to close this, please move https://scratch.mit.edu/discuss/topic/350059/
this one which is the one I recommend posting on
And this one, which may be older, but I don't recommend posting on since the other topic has more replies.
- Discussion Forums
- » Suggestions
-
» alternating colors for conditions, etc
