Discuss Scratch
- Discussion Forums
- » Suggestions
- » Custom block "color" input
- panda-wat
-
100+ posts
Custom block "color" input
currently, when making a custom block, there are two options for inputs you can add: reporters and booleans. however, when trying to make a pen game, which relied a lot on color, I noticed a lack of the color option with custom blocks. this means that the following blocks can't be supported by custom blocks:
set pen color to [#972227]can we have a block like this?
<touching color [#45e660] ?>
<color [#70e849] is touching [#93fc53] ?>
demo custom block [#972227]::customThis would be useful in scripts like:
define draw line with thickness of (pen size) from X: (X1) Y: (Y1) to X: (X2) Y: (Y2) with color [pen color]
pen up
set pen color to (pen color)
set pen size to (pen size)
go to x: (X1) y: (Y1)
pen down
go to x: (X2) y: (Y2)
draw line with thickness of (20) from X: (-200) Y: (-100) to X: (0) Y: (-100) with color [#93fc53]
Last edited by panda-wat (Oct. 19, 2020 23:46:25)
- Byron_Inc
-
1000+ posts
Custom block "color" input
If we uses it, will we get a colour palette to get the colour or an eyedropper?
Uh, and also, in the meantime, you can use hex code instead.
Uh, and also, in the meantime, you can use hex code instead.
- help_with_scripts
-
100+ posts
Custom block "color" input
We can use RGB and the number input that scratch has, which is the same with sprite graphic effects. currently, when making a custom block, there are two options for inputs you can add: reporters and booleans. however, when trying to make a pen game, which relied a lot on color, I noticed a lack of the color option with custom blocks. this means that the following blocks can't be supported by custom blocks:set pen color to [#972227]can we have a block like this?
<touching color [#45e660] ?>
<color [#70e849] is touching [#93fc53] ?>demo custom block [#972227]::customThis would be useful in scripts like:define draw line with thickness of (pen size) from X: (X1) Y: (Y1) to X: (X2) Y: (Y2) with color [pen color]
pen up
set pen color to (pen color)
set pen size to (pen size)
go to x: (X1) y: (Y1)
pen down
go to x: (X2) y: (Y2)
draw line with thickness of (20) from X: (-200) Y: (-100) to X: (0) Y: (-100) with color [#93fc53]
Last edited by Paddle2See (Oct. 19, 2020 15:02:23)
- panda-wat
-
100+ posts
Custom block "color" input
you'd use the thing used to select colors on all other blocks with color inputs. If we uses it, will we get a colour palette to get the colour or an eyedropper?
you can use hex code instead.
I don't even know what these are. We can use RGB and the number input that scratch has, which is the same with sprite graphic effects.
- help_with_scripts
-
100+ posts
Custom block "color" input
RGB:you'd use the thing used to select colors on all other blocks with color inputs. If we uses it, will we get a colour palette to get the colour or an eyedropper?you can use hex code instead.I don't even know what these are. We can use RGB and the number input that scratch has, which is the same with sprite graphic effects.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/10071595/
Set () effect to () graphic effects appear in sprite's looks menu:
set [ v] effect to (0)
- panda-wat
-
100+ posts
Custom block "color" input
IK what the graphic effects are.
also, that really detailed workaround would be tricky for scratchers who aren't master coders to use.
also, that really detailed workaround would be tricky for scratchers who aren't master coders to use.
- help_with_scripts
-
100+ posts
Custom block "color" input
It's not difficult, it's just the universal color system, and the graphic effects are the set () to () block I put in the post. There are many different ways to determine pen color, at least 3 in total. IK what the graphic effects are.
also, that really detailed workaround would be tricky for scratchers who aren't master coders to use.
- panda-wat
-
100+ posts
Custom block "color" input
How do I get the color code? Also once again, there are probably many scratchers unfamiliar with the universal color system. It's not difficult, it's just the universal color system. There are many different ways to determine pen color, at least 3 in total.
and the graphic effects are the set () to () block I put in the post.I know what graphic effects are
- PkmnQ
-
1000+ posts
Custom block "color" input
Well, color codes are in the form #RRGGBB where each digit is in hexadecimal. RR is the value of red, GG is the value of green, and BB is the value of blue. For example, #FFFF00 is yellow.How do I get the color code? Also once again, there are probably many scratchers unfamiliar with the universal color system. It's not difficult, it's just the universal color system. There are many different ways to determine pen color, at least 3 in total.and the graphic effects are the set () to () block I put in the post.I know what graphic effects are
As for graphic effects, they can be found in the looks category
Last edited by PkmnQ (Oct. 20, 2020 00:34:57)
- panda-wat
-
100+ posts
Custom block "color" input
Okay, what does F stand for? none?
Also, the next person to write about graphic effects
Also, the next person to write about graphic effects
- PkmnQ
-
1000+ posts
Custom block "color" input
FF is the maximum. That means red is at maximum, and green is at maximum. 80 is around half. 00 is empty. Okay, what does F stand for? none?
Also, the next person to write about graphic effects
- help_with_scripts
-
100+ posts
Custom block "color" input
A-F are placeholders because hexadecimal uses 16 digits. They act as the 6 extra digits. Okay, what does F stand for? none?
Also, the next person to write about graphic effects
- panda-wat
-
100+ posts
Custom block "color" input
this is a test [#1f46d1] [#00ff00] [#000000]
I guess it works, but not everyone knows hex code.
After all, if they relied on hex code wouldn't we use these blocks instead?
set pen color to [text here]
<color [text] is touching [text] ?>
<touching color [some texxxxxxxxxxt] ?>
Last edited by panda-wat (Oct. 20, 2020 15:56:10)
- help_with_scripts
-
100+ posts
Custom block "color" input
We can use the scale of graphic effects from -200 to 200, or we can use the eyedropper block and insert a join block to make a hacked hexadecimal block.this is a test [#1f46d1] [#00ff00] [#000000]
I guess it works, but not everyone knows hex code.
After all, if they relied on hex code wouldn't we use these blocks instead?set pen color to [text here]
<color [text] is touching [text] ?>
<touching color [some texxxxxxxxxxt] ?>
- Penguin646
-
100+ posts
Custom block "color" input
I love this idea! Though I problably won't use it, it could still be useful do do stuff like this:
draw line with thickness (5) from x: (0) y:(0) to x:(180) y: (160) with color [#efd34a] :: custom
define draw line with thickness (thickness) from x: (startX) y:(startY) to x:(endX) y: (endY) with color [color] :: custom
pen up
go to x: (startX) y: (startY)
set pen size to (thickness)
set pen color to (color)
pen down
go to x: (endX) y: (endY)
pen up
- greninjolo
-
2 posts
Custom block "color" input
how do i make a set color effect to (touching color) script ive tried everything
- hotcrystal
-
100+ posts
Custom block "color" input
Can someone check if this is a dupe? also hi PkmnQ
- AvidOsirianGuy
-
100+ posts
Custom block "color" input
(#17)I'm not sure if so. But this is a good idea nonetheless
Can someone check if this is a dupe? also hi PkmnQ
- jmb1293634
-
100+ posts
Custom block "color" input
what would happen if you did this:
define (#ceebee)I have used #ceebee as an example
set [ v] to (#ceebee)
- NotK3ndricAltAgain
-
100+ posts
Custom block "color" input
Then it would report the hex code? what would happen if you did this:define (#ceebee)I have used #ceebee as an example
set [ v] to (#ceebee)
- Discussion Forums
- » Suggestions
-
» Custom block "color" input