Color sensing block?

I would like this

4 Likes

Nice idea :wink:

3 Likes

This i wanted for a long time, tho couldn’t get HS team to find this on HS. Now I can though XD

1 Like

So something like “color at x: [any x position] y: [any y position lol it doesn’t matter]?

2 Likes

Maybe like, [when “self” is touching “color(black)”] or something right!?

1 Like

That’s cool! I’ll slap a photoshop together for you if you’d like

2 Likes

Cool, I’d very much like that

1 Like

I like this idea

2 Likes

Sorry it’s a little fast but basically When game start check once if touching object then get color from a selection of HSB, RGB or preset colors in hopscotch

5 Likes

Yes! That works…

1 Like

interesting

technically you could do this with values I think

3 Likes

You could very easily do this with variables rn

3 Likes

This is probably possible already - in some way - but I feel like a dedicated block would be easier and nicer! :slight_smile:

4 Likes

Nice idea, but there is one problem.

Unlike in Scratch, Hopscotch has the coding editor on screen at a different time than the stage, so it might be hard to grab colors from characters.

2 Likes

So it might be hard to detect an object’s color because you don’t know the color?
I don’t see how that might be a problem. If you coded it to set color, you’ll know what that color it set to is. And if you forgot, you can go to that object’s code to figure it out.

2 Likes

I’m referring to a Scratch feature where you can select a color from the stage kinda simply by moving your picker onto the color and clicking it

2 Likes

Unless you used a set random color block

Maybe “set color (random), get color (preset color)“ ?

3 Likes
set var((Self)color) to random(1 to 26) // 26 or how many colors there are I forget
set color var((Self)color)
2 Likes

How? Why not show how it can be done?

2 Likes
Monkey {
  Set variable self(color) to 1 // dark purple 
} 
Gorilla {
    When self bumps Monkey
       If monkey(color) = 1 {
  Destroy 
}

}

for hsb colors it’d be hard

2 Likes