<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[&quot;When touching color ()&quot; Block]]></title><description><![CDATA[<p dir="auto"> </p>
<h2><a class="anchor-offset" name="prerequisite"></a>Prerequisite</h2>
<ul>
<li><a href="/topic/73/working-with-blocks">Working with Blocks</a></li>
</ul>
<p dir="auto"> </p>
<h2><a class="anchor-offset" name="description"></a>Description</h2>
<p dir="auto">The “When touching color ()” block is a Hat block in the Events category.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/e8b08f22-eb3e-4fdf-98a8-8c1b97f423d9.PNG" width="650" /><br />
 </p>
<h2><a class="anchor-offset" name="how-does-this-block-work"></a>How does this block work?</h2>
<p dir="auto">This block runs the blocks attached below it when the current sprite touches the specified color.</p>
<p dir="auto">To choose a color, you can click on the color input and then change the “color” bar left or right. <img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0e3764ef-f5e0-4e46-b897-ba1424546d69.PNG" width="250" /></p>
<p dir="auto"> <br />
You can also use the “color picker” tool to select any color on the stage. <img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/20adf8ba-f903-4d77-843a-e31c310d472e.PNG" width="50" /></p>
<p dir="auto">The example below shows that when the current sprite (Goblin) touches the blue crystal, it changes the costume and says “I found treasure”.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/df24b701-db40-4eb7-be56-a876ccf59638.gif" width="800" style="border-radius:5px;border:1px solid #29622d" /><br />
 </p>
<h2><a class="anchor-offset" name="animation"></a>Animation</h2>
<p dir="auto">Here is how you can create a simple game with the “When touching color ()” block. For example, when the Goblin touches the blue color on the crystal, it gets a point.</p>
<p dir="auto"><img src="https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/22427abc-9738-4844-a782-4fcbcdb35a35.gif" width="800" style="border-radius:5px;border:1px solid #29622d" /><br />
 </p>
]]></description><link>https://forum.creaticode.com/topic/310/when-touching-color-block</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 10:46:49 GMT</lastBuildDate><atom:link href="https://forum.creaticode.com/topic/310.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Jul 2022 03:50:04 GMT</pubDate><ttl>60</ttl></channel></rss>