Skip to content

Touching Color reports false when some colors not selected with eyedropper #2044

@BryceLTaylor

Description

@BryceLTaylor

Expected Behavior

If you set the color of a shape by setting the numbers of its fill, the Touching Color sensing block should report that it's touching that color if its color was set to the same numbers.

Actual Behavior

Fore some colors, such as blue (60, 100, 100) if you set the color of the Touching Color block by sliding the numbers to that position it will report false. If you use the Eyedropper to select the color it will show the same numbers, but report true when touching.

touchingColorBlue

It does not matter if you use the background of the stage or a sprite as the thing you are detecting color on.

The color red (0, 100, 100) CAN be detected with the touching color block if you set it with the sliders.
touchingColorRed

This is related to this issue: #1695

Steps to Reproduce

Create a new project
Switch to the costumes tab and switch to the backdrop
Select the square tool
Set the fill to Blue (60, 100, 100)
Set the stroke to transparent
Draw a square on the stage
Switch to the code tab of the cat sprite
Add the following code:
Screen Shot 2019-03-11 at 12 11 12 PM
Click on the color of the Touching Color block
Set the sliders to the same color from before (60, 100, 100) (Don't use the eyedropper)
Click the green flag
Drag the cat over the blue square
Note: the cat says "false"
Click the color on the Touching Color block
Choose the eyedropper
Select the blue square with the eyedropper
Note: the numbers on the sliders don't change but the cat now reports "blue"

Operating System and Browser

Mac Chrome

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions