# Sprite touching color?

**URL:** <https://forum.makecode.com/t/sprite-touching-color/38126>\
**Category:** Arcade\
**Created:** [July 16, 2025, 8:42pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126 "2025-07-16T20:42:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheBestialCelestial](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thebestialcelestial/32/34092_2.png) [@TheBestialCelestial](https://forum.makecode.com/u/TheBestialCelestial)\
**Post date:** [July 16, 2025, 8:42pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126/1 "2025-07-16T20:42:58Z")

</div>

In Scratch, there’s a helpful block that detects if a sprite is touching a specific color. I’m attempting to code this into my game, but nothing seems to work. Has anyone coded this before, or otherwise have knowledge on how it could be done?

---

<div class="post-metadata">

**Author:** ![BlobDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobdev/32/25519_2.png) [@BlobDev](https://forum.makecode.com/u/BlobDev)\
**Post date:** [July 17, 2025, 5:09pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126/2 "2025-07-17T17:09:36Z")

</div>

If image = found in the images category (complex)

---

<div class="post-metadata">

**Author:** ![ShaneyBoi09](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shaneyboi09/32/18893_2.png) [@ShaneyBoi09](https://forum.makecode.com/u/ShaneyBoi09)\
**Post date:** [July 17, 2025, 5:25pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126/3 "2025-07-17T17:25:23Z")

</div>

_GitHub is always the answer…_

---

<div class="post-metadata">

**Author:** ![CodePerson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeperson/32/32288_2.png) [@CodePerson](https://forum.makecode.com/u/CodePerson)\
**Post date:** [July 17, 2025, 5:32pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126/4 "2025-07-17T17:32:56Z")

</div>

Instead of using the if the sprite is touching the color block, you can use the if is sprite overlapping with othersprite. Scratch can have a lot of their own unique blocks and ways of coding that could be impractical in other engines.

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [July 17, 2025, 7:59pm UTC](https://forum.makecode.com/t/sprite-touching-color/38126/5 "2025-07-17T19:59:19Z")

</div>

I think they want it for color coded hitboxes without making hitbox sprites
