Discuss Scratch

cwkethan1508
Scratcher
100+ posts

New block, about colours!

dude341 wrote:

cwkethan1508 wrote:

No support

if <touching color [#ff0088] ?> then
do stuff :: motion

end
The block he's suggesting is nothing like that. It detects what colour they're touching.
Not to be mean, but
when gf clicked
if <<touching color [#ff0088] ?> or <<touching color [#ff0088] ?> >> then
do stuff
end

Last edited by cwkethan1508 (May 9, 2015 01:37:48)

matey1234
Scratcher
1000+ posts

New block, about colours!

IronBit_Studios wrote:

cwkethan1508 wrote:

No support

if <touching color [#ff0088] ?> then
do stuff :: motion
end
Why? Please don't necropost and go off topic, as well.
It's.. still relevant.
dude341
Scratcher
1000+ posts

New block, about colours!

cwkethan1508 wrote:

dude341 wrote:

cwkethan1508 wrote:

No support

if <touching color [#ff0088] ?> then
do stuff :: motion

end
The block he's suggesting is nothing like that. It detects what colour they're touching.
Not to be mean, but
when gf clicked
if <<touching color [#ff0088] ?> or <<touching color [#ff0088] ?> >> then
do stuff
end

That doesn't work. Stop trolling.
MathlyCat
Scratcher
1000+ posts

New block, about colours!

123789456000 wrote:

Could the Scratch team possibly make a sensing block that reports what colour the sprite is touching? Everyone says its a great idea and when you do make it, Scratch will be a lot better.
One thing, how would it make a Scratch a whole lot better, and why is scratch not as good at the moment? Not trying to be hypercritical!

Support I guess.
cwkethan1508
Scratcher
100+ posts

New block, about colours!

dude341 wrote:

cwkethan1508 wrote:

dude341 wrote:

cwkethan1508 wrote:

No support

if <touching color [#ff0088] ?> then
do stuff :: motion

end
The block he's suggesting is nothing like that. It detects what colour they're touching.
Not to be mean, but
when gf clicked
if <<touching color [#ff0088] ?> or <<touching color [#ff0088] ?> >> then
do stuff
end

That doesn't work. Stop trolling.
How am I trolling, I am just suggesting workarounds.
Anyway,
support for the color at x: y:
jmb1293634
Scratcher
1000+ posts

New block, about colours!

fanonscratch12 wrote:

123789456000 wrote:

Could the Scratch team possibly make a sensing block that reports what colour the sprite is touching? Everyone says its a great idea and when you do make it, Scratch will be a lot better.
This is a great idea.

CosmicHamster wrote:

I support!
please give a reason why you support

kvackkvack wrote:

I do not support this, but rather this block:
(color at x: () y: () :: sensing)

// To check what color the sprite is touching, all you now have to do is this:
(color at x: (x position) y: (y position) :: sensing)

Gaza101 wrote:

(color this sprite is touching :: sensing)
[scratchblocks]
(color this sprite is touching :: sensing)
[/scratchblocks]
should be reporters and to second one it would probably be american spellings you can see a topic to add British spellings here

to OP: what would it report HSB? RGB? in my opinion it should be:
[hue v] at x:() y:()::sensing reporter
[saturation v] at x:() y:()::sensing reporter
[brightness v] at x:() y:()::sensing reporter
Redbotix
Scratcher
14 posts

New block, about colours!

i support this

Last edited by Redbotix (May 20, 2025 16:53:08)

Redbotix
Scratcher
14 posts

New block, about colours!

What if they just add a
pick color::pen
block?

It would not require any new datatypes, or any complexity. You could just go to that coord, pick the color, and go back to drawing.
I analyzed a lot of use cases for the
(color at x: (0) y: (0)::sensing)
block, which include image capturing, paint programs, etc. and i think that a
pick color::pen
block would be a simpler solution, thus keeping Scratch’s simplicity.
jmb1293634
Scratcher
1000+ posts

New block, about colours!

Redbotix wrote:

What if they just add a
pick color::pen
block?

It would not require any new datatypes, or any complexity. You could just go to that coord, pick the color, and go back to drawing.
I analyzed a lot of use cases for the
(color at x: (0) y: (0)::sensing)
block, which include image capturing, paint programs, etc. and i think that a
pick color::pen
block would be a simpler solution, thus keeping Scratch’s simplicity.
how would
pick color::pen
work?
Redbotix
Scratcher
14 posts

New block, about colours!

jmb1293634 wrote:

Redbotix wrote:

What if they just add a
pick color::pen
block?

It would not require any new datatypes, or any complexity. You could just go to that coord, pick the color, and go back to drawing.
I analyzed a lot of use cases for the
(color at x: (0) y: (0)::sensing)
block, which include image capturing, paint programs, etc. and i think that a
pick color::pen
block would be a simpler solution, thus keeping Scratch’s simplicity.
how would
pick color::pen
work?

It would change the pen color to the color of the position the sprite is currently on, while excluding the sprite. Let’s say that i have a ScratchCat sprite on a red background and I run pick color, it will change the pen color to red, because it ignores the color of its own costume.

For the 2 use cases that i mentioned, here’s an example…
for image capturing:
when [space v] key pressed
go to x: (-240) y: (-180)
repeat (360)
set x to (-240)
repeat (480)
change x by (1)
pick color::pen
pen down
pen up
end
change y by (1)
end
and for a paint program
when green flag clicked
forever
go to [mouse pointer v]
if <<(mode) = [color picker]> and <mouse down?>> then
pick color::pen
end
if <<(mode) = [pencil]> and <mouse down?>> then
pen down
else
pen up
end
end

Last edited by Redbotix (May 21, 2025 02:49:07)

Redbotix
Scratcher
14 posts

New block, about colours!

jmb1293634 wrote:

fanonscratch12 wrote:

123789456000 wrote:

Could the Scratch team possibly make a sensing block that reports what colour the sprite is touching? Everyone says its a great idea and when you do make it, Scratch will be a lot better.
This is a great idea.

CosmicHamster wrote:

I support!
please give a reason why you support

kvackkvack wrote:

I do not support this, but rather this block:
(color at x: () y: () :: sensing)

// To check what color the sprite is touching, all you now have to do is this:
(color at x: (x position) y: (y position) :: sensing)

Gaza101 wrote:

(color this sprite is touching :: sensing)
[scratchblocks]
(color this sprite is touching :: sensing)
[/scratchblocks]
should be reporters and to second one it would probably be american spellings you can see a topic to add British spellings here

to OP: what would it report HSB? RGB? in my opinion it should be:
[hue v] at x:() y:()::sensing reporter
[saturation v] at x:() y:()::sensing reporter
[brightness v] at x:() y:()::sensing reporter

Also Scratch uses color instead of hue, so it should be
[color v] at x:() y:()::sensing reporter
[saturation v] at x:() y:()::sensing reporter
[brightness v] at x:() y:()::sensing reporter

Last edited by Redbotix (May 21, 2025 02:57:50)

Powered by DjangoBB