Discuss Scratch
- Discussion Forums
- » Suggestions
- » Pen RGB
- octopus1234
-
60 posts
Pen RGB
I'm sorry if you've heard this before, but I think adding a Pen RGB block would be nice. Using a complicated math problem to find the pen color is kind of random. It would make it much easier (and cleaner) to have an RGB block, and it wouldn't take away the programming. It would make it easier to do more complicated things without using seemingly random math. Again, I'm sorry if you've seen this before.
- ACE009
-
100+ posts
Pen RGB
The math isn’t random, since colors are stored as 1 byte for red, green, and blue, totaling in 3 bytes per pixel. Since a byte is 8 bits and each bit has 2 possible values, you can calculate 2^8 to find that each byte can store one of 256 different values. The pen blocks will take a number input of the color code, so you can input RGB with the below: (I might have flipped the red and blue inputs.)
- ACE009
-
100+ posts
Pen RGB
Yes. If you want, you can also prefix the raw hex number with 0x (either with a variable or the join block) and Scratch will do the conversion to decimal for you.
Last edited by ACE009 (May 24, 2018 21:20:39)
- Zekrom01
-
1000+ posts
Pen RGB
Support, the workaround is quite tedious and RGB is a crucial part of programming in the real world.
- -ShadowOfTheFuture-
-
1000+ posts
Pen RGB
It's already possible to set pen color using RGB. (It's a somewhat hidden feature though)
Last edited by -ShadowOfTheFuture- (May 24, 2018 20:04:47)
- duckboycool
-
1000+ posts
Pen RGB
If you want a suggestion to not have to use the workaround, this would be a duplicate.
- Paddle2See
-
1000+ posts
Pen RGB
duplicate.Thanks for the link! It does look like this is a duplicate topic so I'll close it to keep the conversation all in one place. If you want a suggestion to not have to use the workaround, this would be a
Please use the existing topic in the link above.
- Discussion Forums
- » Suggestions
-
» Pen RGB