Discuss Scratch

badatprogrammingibe
Scratcher
500+ posts

Colour of pixel at location.

Could look something like this, and either could return a hex value of the colour or another form.
(color of pixel at x: () y: () :: sensing)
Anyways this is needed as the workarounds are very cumbersome and slow.

Last edited by badatprogrammingibe (April 9, 2019 01:47:28)

Za-Chary
Scratcher
1000+ posts

Colour of pixel at location.

Could you give a specific example of how this might be useful? (Something other than “it can be used to detect color at a certain location”.)

In addition, what could it return, hexadecimal values for color?

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
badatprogrammingibe
Scratcher
500+ posts

Colour of pixel at location.

Za-Chary wrote:

Could you give a specific example of how this might be useful? (Something other than “it can be used to detect color at a certain location”.)

In addition, what could it return, hexadecimal values for color?
If you look at projects that scan pictures to lists, they are very slow as they cannot directly detect the colour of a pixel at a specific location, rather they must go through every colour for every pixel.
This would allow for fast scanning.

I suppose it would return hexadecimal values for colour, however scratch could choose to implement it differently than I have in mind (for example using scratch's in built colour mechanism.)
Tallented-Code-bot
Scratcher
100+ posts

Colour of pixel at location.

No support, this could allow people to scan from the camera and put it on a cloud variable, than look at it and possibly record them.
Za-Chary
Scratcher
1000+ posts

Colour of pixel at location.

badatprogrammingibe wrote:

Za-Chary wrote:

Could you give a specific example of how this might be useful? (Something other than “it can be used to detect color at a certain location”.)

In addition, what could it return, hexadecimal values for color?
If you look at projects that scan pictures to lists, they are very slow as they cannot directly detect the colour of a pixel at a specific location, rather they must go through every colour for every pixel.
This would allow for fast scanning.

I suppose it would return hexadecimal values for colour, however scratch could choose to implement it differently than I have in mind (for example using scratch's in built colour mechanism.)
Hmm…that does sound cool.

Overall, I'd say semi-support because you'd be able to make some really cool stuff with this. However, one would have to consider very heavily how this boolean returns stuff. Would it return a hexadecimal value? If so, that may be confusing for younger users. Would it return a list of numbers representing the colors in the editor? If so, that may be tough since no other Scratch boolean returns lists (to my knowledge).

I do think it could work, though. It would just require some thought, as always.

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
DaEpikDude
Scratcher
1000+ posts

Colour of pixel at location.

Za-Chary wrote:

badatprogrammingibe wrote:

Za-Chary wrote:

Could you give a specific example of how this might be useful? (Something other than “it can be used to detect color at a certain location”.)

In addition, what could it return, hexadecimal values for color?
If you look at projects that scan pictures to lists, they are very slow as they cannot directly detect the colour of a pixel at a specific location, rather they must go through every colour for every pixel.
This would allow for fast scanning.

I suppose it would return hexadecimal values for colour, however scratch could choose to implement it differently than I have in mind (for example using scratch's in built colour mechanism.)
Hmm…that does sound cool.

Overall, I'd say semi-support because you'd be able to make some really cool stuff with this. However, one would have to consider very heavily how this boolean returns stuff. Would it return a hexadecimal value? If so, that may be confusing for younger users. Would it return a list of numbers representing the colors in the editor? If so, that may be tough since no other Scratch boolean returns lists (to my knowledge).

I do think it could work, though. It would just require some thought, as always.
I'd imagine it's probably supposed to be a reporter:
(color at x: () y: ()::sensing)

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
Za-Chary
Scratcher
1000+ posts

Colour of pixel at location.

DaEpikDude wrote:

I'd imagine it's probably supposed to be a reporter:
(color at x: () y: ()::sensing)
Ah, good point. That must be what @badatprogrammingibe was referring to. It still may be a little tough to determine what it returns, though.

This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.

I was a Scratch Team member from May 10th 2019 to October 29th 2021.

my notebook | scratch team essay | accessibility essay
badatprogrammingibe
Scratcher
500+ posts

Colour of pixel at location.

DaEpikDude wrote:

Za-Chary wrote:

badatprogrammingibe wrote:

Za-Chary wrote:

Could you give a specific example of how this might be useful? (Something other than “it can be used to detect color at a certain location”.)

In addition, what could it return, hexadecimal values for color?
If you look at projects that scan pictures to lists, they are very slow as they cannot directly detect the colour of a pixel at a specific location, rather they must go through every colour for every pixel.
This would allow for fast scanning.

I suppose it would return hexadecimal values for colour, however scratch could choose to implement it differently than I have in mind (for example using scratch's in built colour mechanism.)
Hmm…that does sound cool.

Overall, I'd say semi-support because you'd be able to make some really cool stuff with this. However, one would have to consider very heavily how this boolean returns stuff. Would it return a hexadecimal value? If so, that may be confusing for younger users. Would it return a list of numbers representing the colors in the editor? If so, that may be tough since no other Scratch boolean returns lists (to my knowledge).

I do think it could work, though. It would just require some thought, as always.
I'd imagine it's probably supposed to be a reporter:
(color at x: () y: ()::sensing)
Yeah, that's what it was supposed to be.
Sheep_maker
Scratcher
1000+ posts

Colour of pixel at location.

Duplicate

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
SuperGame592
Scratcher
49 posts

Colour of pixel at location.

It is slow, but fast:
(2 by 2 costume)
when green flag clicked
Find Pixel At X: () and Y: ()

define Find Pixel At X: (x) and Y: (y)
found = 0
go to x: (x) y: (y)
repeat until <(found) = [1]>
colour += 1
if <touching color (colour)>
found = 1
end

Last edited by SuperGame592 (July 9, 2022 08:00:37)


I am cool. Pleasey out try out my projects. Moo. Oink.
https://scratch.mit.edu/projects/701493153/editor/
Beta
SuperGame592
Scratcher
49 posts

Colour of pixel at location.

Sheep_maker wrote:

Duplicate
Er, that's wrong.

I am cool. Pleasey out try out my projects. Moo. Oink.
https://scratch.mit.edu/projects/701493153/editor/
Beta
yavuz61035
Scratcher
500+ posts

Colour of pixel at location.

Tallented-Code-bot wrote:

No support, this could allow people to scan from the camera and put it on a cloud variable, than look at it and possibly record them.
even if you tried it would be very low resulotion (the current restrictions do well on preventing chats and recording video footage)

support, since any current workarounds currently lag scratch quite a bit

but a point to discuss is would it result a hex or a color value
if it would be a color value then we could convert it (would be hard for less experienced scratchers) or we could add a “turn (color) to hex” block but that is an entirely different suggestion, so suggest it on a new topic

Last edited by yavuz61035 (July 8, 2022 19:11:09)


i am yavuz61035!

i like birds (especially budgies) | my studio is here! | a project i was working on, mine game! | pronouns: he/him/they/blabla ok just use anything please stop reading this part | my 100th post! | be moist wet | musicROCKS013 predicts the future

fun fact: my pfp has pride month forever
a link

little social experiment corner:
increase gen thingy:
gen: 14
gen: 14
gen: 11
1ogic
Scratcher
100+ posts

Colour of pixel at location.

Here's the actual duplicate (or at least one of them): https://scratch.mit.edu/discuss/topic/250529/

Tallented-Code-bot wrote:

No support, this could allow people to scan from the camera and put it on a cloud variable, than look at it and possibly record them.
I've put my thoughts out on this in the other thread but, worse case scenario, disable camera if the project has cloud variables, this block, and camera on in the same project.

Griffpatch made a great video on how to do a reasonably fast color picker that can be done in Scratch now here: https://www.youtube.com/watch?v=aBTh756kCZw
However, I think there is still merit to having a block like this for the increased performance and accuracy, in addition to being much more intuitive then the work around we have now.

Last edited by 1ogic (July 9, 2022 00:03:44)

SuperGame592
Scratcher
49 posts

Colour of pixel at location.

1ogic wrote:

Here's the actual duplicate (or at least one of them): https://scratch.mit.edu/discuss/topic/250529/

Tallented-Code-bot wrote:

No support, this could allow people to scan from the camera and put it on a cloud variable, than look at it and possibly record them.
I've put my thoughts out on this in the other thread but, worse case scenario, disable camera if the project has cloud variables, this block, and camera on in the same project.

Griffpatch made a great video on how to do a reasonably fast color picker that can be done in Scratch now here: https://www.youtube.com/watch?v=aBTh756kCZw
However, I think there is still merit to having a block like this for the increased performance and accuracy, in addition to being much more intuitive then the work around we have now.
i agree also blank
meet ok. He gives you something.
Wait no. Press both. both

Ok!

Last edited by SuperGame592 (July 9, 2022 08:04:43)


I am cool. Pleasey out try out my projects. Moo. Oink.
https://scratch.mit.edu/projects/701493153/editor/
Beta

Powered by DjangoBB