Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 2D Blocks
  4. The "Touching Color ()" Block

The "Touching Color ()" Block

Scheduled Pinned Locked Moved 2D Blocks
1 Posts 1 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Prerequisite

    • Working with Blocks
    • Painting a Costume

     

    Description

    The “touching color ()” block is a boolean block in the sensing category.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/7c096924-646a-49ca-baaf-07b9c8bc316c.PNG" width="550" style="">
     

    How does this block work?

    This block tells us whether the current sprite is touching a color or not.

    You can set the color by clicking on the color input of the block, https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/339e3d27-52cf-4591-8d9b-7b69d69107a3.PNG" width="180" style=""> and then slide the “Color” bar left or right to get the color of your choice.
    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/d846c68b-dd6b-48d3-83a8-7498394b49c4.PNG" width="200" style="">

    Here is an example:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/c07f006f-a051-4d5d-9842-6d06b16c43be.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
     

    Picking Color

    You can also select the color directly using the “color picker” tool. color pick.PNG

    After you click the “color picker” tool, you can click at any point on the stage to use that point’s color.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/7e026f28-e4bc-41bc-a820-ee004f14ac21.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
     

    Example - Racing Game

    You can create a racing game with the “touching color ()” block as shown below. The dog keeps moving on the road until it touches the red finish line.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/82dfc78b-3238-4f80-802d-e84f9e091341.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
     

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode