Discuss Scratch

Tommy100
Scratcher
100+ posts

( Color Touching ) Block

(color touching :: sensing)
This is a block I think could really help some people with projects. It is non-workaroundable. It would return the hex value of the color that it is touching. Unlike something like “(key pressed)”, this block would work because obviously a sprite will always be touching some color.


Common question explanations…

Q. Well, why don't you just use “if else” statements? (Example below….)
if <touching color [#2ee1ca] ?> then 



else
if <touching color [#ffffff] ?> then



else
if <touching color [#000000] ?> then



else

end
end
end

A: This cannot be done. There are over 16 million different hex color codes!

Q: Okay, well. This new block idea would not work because what if the sprite is touching two or more different colors at once?

A: It would return the hex color code of the color it is touching right underneath it. Literally meaning that this block returns the hex color value of the x/y position of the sprite.



Supports (1):

Tommy100



Last edited by Tommy100 (Oct. 30, 2016 16:37:10)

lance4dragons
Scratcher
100+ posts

( Color Touching ) Block

I support, but what would this be useful for? Why would you need it? I mean, you could do
if <[(moo)] = [("your hex here!")]> then
...
end
why would people need to use it?

Last edited by lance4dragons (Oct. 30, 2016 15:44:27)


-L̴̩̹̫͈̰̬̪̩͔̗͇̳̲̬͙͎͂̋̌ͬͧ͆̒ͧ̐ͪ̏̓̌͑ͦ̃ͯ͌͡ąͦͪ̇ͨ̽̐͗ͤͤͭ̇̕͘͡҉̲̻̳̺͕͔̳ṉ̶̡͚̦̰̳͍̤͈͇͈͚̤̲̱͇͍͂̓̍ͭ̒́ͪ͐̆̏̇͊̈́͋ͨͫ͛̕͢ͅc̷̨̪͇͈̫̏̀̆̈̿͛͗̈́̂̅̀͟͝ͅe̸ͧͧͫ̈̀̄̽͗ͥ̀ͫͩ̓̊̒͝͏̙̙̙̹̣̰̥̘̣͚̘̼͙̭̟4͇̫͙̩͇̣̳̹̄͂ͭ̓͑̉̾ͯ̕d̷̷̛̐̒̍ͣ̂̏͑̆̄̌̑͏̢͙͔̘̝̩̬̝̬͍͇r̴͒̾́̏̌̉ͪ̂̆̇ͧͮͧ́̎͋҉͎̥̭̦̘͓̗̯͕̹͕̲͜͞ḁ̢̛̯̱͓͇̗͉͔̩̥̲̪̣̗͙̜͌̇͐̉ͨ̅ͧģ̧̫̯̙͙̳̘͙ͫͤ̊͆̒̂͗̀̓̉ͧ̚̕͞ͅǒ̸̸̗̠͕̑̂̆̈́ͧ̅͋͛̆̓ͬ̾̚n̡̂͊̓͒ͧ̔̍̾͘҉̥̙̞̜͎̱͓̤̠̣͙̼̖̼̺͍͚͖͠s̸̤̼̮̹͍̥̝̩̤̏̂͋̑

You are being watched…

lance4dragons
Scratcher
100+ posts

( Color Touching ) Block

glitchy scratch blocks dang it

-L̴̩̹̫͈̰̬̪̩͔̗͇̳̲̬͙͎͂̋̌ͬͧ͆̒ͧ̐ͪ̏̓̌͑ͦ̃ͯ͌͡ąͦͪ̇ͨ̽̐͗ͤͤͭ̇̕͘͡҉̲̻̳̺͕͔̳ṉ̶̡͚̦̰̳͍̤͈͇͈͚̤̲̱͇͍͂̓̍ͭ̒́ͪ͐̆̏̇͊̈́͋ͨͫ͛̕͢ͅc̷̨̪͇͈̫̏̀̆̈̿͛͗̈́̂̅̀͟͝ͅe̸ͧͧͫ̈̀̄̽͗ͥ̀ͫͩ̓̊̒͝͏̙̙̙̹̣̰̥̘̣͚̘̼͙̭̟4͇̫͙̩͇̣̳̹̄͂ͭ̓͑̉̾ͯ̕d̷̷̛̐̒̍ͣ̂̏͑̆̄̌̑͏̢͙͔̘̝̩̬̝̬͍͇r̴͒̾́̏̌̉ͪ̂̆̇ͧͮͧ́̎͋҉͎̥̭̦̘͓̗̯͕̹͕̲͜͞ḁ̢̛̯̱͓͇̗͉͔̩̥̲̪̣̗͙̜͌̇͐̉ͨ̅ͧģ̧̫̯̙͙̳̘͙ͫͤ̊͆̒̂͗̀̓̉ͧ̚̕͞ͅǒ̸̸̗̠͕̑̂̆̈́ͧ̅͋͛̆̓ͬ̾̚n̡̂͊̓͒ͧ̔̍̾͘҉̥̙̞̜͎̱͓̤̠̣͙̼̖̼̺͍͚͖͠s̸̤̼̮̹͍̥̝̩̤̏̂͋̑

You are being watched…

Bright-Idea
Scratcher
1000+ posts

( Color Touching ) Block

lance4dragons wrote:

I support, but what would this be useful for? Why would you need it? I mean, you could do
if <(moo) = ["hex here"]> then
...
end
why would people need to use it?
ftfy
Remember to use the “Preview” button (the green check) before you post.
Also, Scratchblocks aren't glitchy, they're just complicated. There's a lot of little tricks for them.

I’m Back!
jokebookservice1
Scratcher
1000+ posts

( Color Touching ) Block

But sprites can touch multiple colours at the same time, so how would that work? Maybe the sprite could report the colour directly under it, but this would allow users to be filmed and the recording placed onto Cloud Data.
Tommy100
Scratcher
100+ posts

( Color Touching ) Block

lance4dragons wrote:

I support, but what would this be useful for? Why would you need it? I mean, you could do
if <[(moo)] = [("your hex here!")]> then
...
end
why would people need to use it?
Webcam picture generators.
Tommy100
Scratcher
100+ posts

( Color Touching ) Block

jokebookservice1 wrote:

But sprites can touch multiple colours at the same time, so how would that work? Maybe the sprite could report the colour directly under it, but this would allow users to be filmed and the recording placed onto Cloud Data.
Yes, that is what it would do. It would report the color directly underneath it. It's center.
jokebookservice1
Scratcher
1000+ posts

( Color Touching ) Block

Tommy100 wrote:

lance4dragons wrote:

I support, but what would this be useful for? Why would you need it? I mean, you could do
if <[(moo)] = [("your hex here!")]> then
...
end
why would people need to use it?
Webcam picture generators.
Isn't this a downside: a privacy concern when combined with Cloud Data?

Powered by DjangoBB