How to use an RGB value as input to the TOUCHING? block

The TOUCHING? block allows setting the color from a palette. I don't see how to specify the color as an RGB value. I try to put a list as an into the block, but it won't go.

Welcome to the forum, tempel!

Here's how you place an RGB value in the touching [#1067DA] ? block:

untitled script pic (67)

Replace 16,103,218 with the RGB format.

[#49ff30], huh til you can put hex codes into snap blocks

You can also use rgb values if you don't want to use a hex converter.

[rgb(73, 255, 48)]
[rgb(73, 255, 48)]

(hex works in scratchblocks, but rgb is unique to snapblocks)

why does it put it in a cap block instead of the default "other" command, or even better, by itself?

I tried using this with set background color to [rgb(0, 0, 0)] to make the stage transparent but it only turns it completely black :frowning:

Honestly, I'm not sure, since it doesn't happen outside the forum.

it doesn't happen anywhere else? weird, wonder why the fourm

I think the OP was talking about actually programming in Snap!, rather than about posting on the forum.

This is how to use @ten_6044 suggestion

untitled script pic (83)

to check for touching a pure red colour

I was replying to @mr_owlssssnap2, which I read it as "you can put hex codes into snapblocks", but now that I reading it again, I have no idea what they were trying to say.

You read it correctly the first time

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.