Discuss Scratch
- Discussion Forums
- » Suggestions
- » <touching color?> block shouldn't have to be exact
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
<touching color [#83a563] ?>
I've been making a game that uses the <touching color?> block, but the block rarely works. The color has to be EXACT for it to work, which is frustrating. Sometimes the color even is exact but the block still doesn't work. Everything would be correct, down to the Color, Saturation, and Brightness numbers, yet the block would still only work half the time. To fix this, the block should be coded so that the color just has to be very close to the color specified. Basically if the human eye can't tell the difference, it'll work. This will make the block a lot easier to work with.
Edit: The reply directly below adds new blocks that could actually help with this issue without breaking other projects.
Last edited by Dodger380468 (May 26, 2023 16:20:24)
- HAL95131
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
<touching color [#83a563] ?>
I've been making a game that uses the <touching color?> block, but the block rarely works. The color has to be EXACT for it to work, which is frustrating. Sometimes the color even is exact but the block still doesn't work. Everything would be correct, down to the Color, Saturation, and Brightness numbers, yet the block would still only work half the time. To fix this, the block should be coded so that the color just has to be very close to the color specified. Basically if the human eye can't tell the difference, it'll work. This will make the block a lot easier to work with.
So this?
set [color v] sensing leeway to [] :: sensing
([color v] sensing leeway :: sensing)
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
Last edited by cookieclickerer33 (May 24, 2023 15:27:34)
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
I've never seen t
I've never seen that before
<touching color [#83a563] ?>
I've been making a game that uses the <touching color?> block, but the block rarely works. The color has to be EXACT for it to work, which is frustrating. Sometimes the color even is exact but the block still doesn't work. Everything would be correct, down to the Color, Saturation, and Brightness numbers, yet the block would still only work half the time. To fix this, the block should be coded so that the color just has to be very close to the color specified. Basically if the human eye can't tell the difference, it'll work. This will make the block a lot easier to work with.
So this?set [color v] sensing leeway to [] :: sensing
([color v] sensing leeway :: sensing)
I've never seen that before
- HAL95131
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
I've never seen tHm? Do you mean that you’re surprised at these ideas, or do you think they’re actual blocks? If so, they are not - I am just using the scratchblocks plugin.<touching color [#83a563] ?>-original suggestion-
So this?set [color v] sensing leeway to [] :: sensing
([color v] sensing leeway :: sensing)
I've never seen that before
Last edited by HAL95131 (May 24, 2023 15:51:30)
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
I've never seen tHm? Do you mean that you’re surprised at these ideas, or do you think they’re actual blocks? If so, they are not - I am just using the scratchblocks plugin.<touching color [#83a563] ?>-original suggestion-
So this?set [color v] sensing leeway to [] :: sensing
([color v] sensing leeway :: sensing)
I've never seen that before
I thought they were actual blocks, but they should be. Since Scratch is supposed to be a simple coding site, I think the <touching color?> block should just not have to be exact by default.
Last edited by Dodger380468 (May 24, 2023 16:03:45)
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
“If the human eye can’t tell the difference”How do you do “leniency” when hex colors aren’t numbers
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
Last edited by cookieclickerer33 (May 24, 2023 16:05:27)
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
- HAL95131
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
Yes, I feel like they could maybe use RGB values to check similarity between colors?
(also, sorry if I was being stupid - did not read the entire post from the cookie person. LOL (maybe offtopic))
(also, sorry if I was being stupid - did not read the entire post from the cookie person. LOL (maybe offtopic))
Last edited by HAL95131 (May 24, 2023 16:08:29)
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
The computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
- HAL95131
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
The computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
What about RGB and HSV? I don’t think we’re stuck with hex colors.
Last edited by HAL95131 (May 24, 2023 16:10:28)
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
The computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
It's still possible, just make it so that it senses whether the Color, Saturation, and Darkness are close or not. I'm sure Scratch can even come up with a way better way to achieve this. Computers are capable of more than meets the eye (see what I did there?)
Last edited by Dodger380468 (May 24, 2023 16:11:23)
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
Also, yes, I feel like they could maybe use RGB values to check similarity between colors?That would break projects because the block uses hex color codes and you can do
<touching color (join [#] [099e99]) ?>To bypass that, this is used quite often
Also the paint editor supports an alpha/transparency Chanel, this works with the touching color block as well
It’s better to just do
<<touching color [#099e99] ?> or <touching color [#659e80] ?>>Or not use the block at all because of how slow it is
- Za-Chary
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.One problem may be that two people perceive colors in slightly different ways. I think some studies have shown that women can see more colors than men. So this complicates the matter further on what “the human eye” means.
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
Also, yes, I feel like they could maybe use RGB values to check similarity between colors?That would break projects because the block uses hex color codes and you can do<touching color (join [#] [099e99]) ?>To bypass that, this is used quite often
Also the paint editor supports an alpha/transparency Chanel, this works with the touching color block as well
It’s better to just do<<touching color [#099e99] ?> or <touching color [#659e80] ?>>Or not use the block at all because of how slow it is
Why is it there if it's so broken? It really should be improved because it can be so useful in many situations
Last edited by Dodger380468 (May 24, 2023 16:12:37)
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
Saturation and darkness come from the hex valueThe computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
It's still possible, just make it so that it senses whether the Color, Saturation, and Darkness are close or not. I'm sure Scratch can even come up with a way better way to achieve this. Computers are capable of more than meets the eye (see what I did there?)
Also you literally said color
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
Almost every color in scratch deprives from hex including the very topic of discussion hereThe computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
What about RGB and HSV? I don’t think we’re stuck with hex colors.
- HAL95131
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
Also, yes, I feel like they could maybe use RGB values to check similarity between colors?That would break projects because the block uses hex color codes and you can do<touching color (join [#] [099e99]) ?>To bypass that, this is used quite often
Also the paint editor supports an alpha/transparency Chanel, this works with the touching color block as well
It’s better to just do<<touching color [#099e99] ?> or <touching color [#659e80] ?>>Or not use the block at all because of how slow it is
Can’t you convert it to RGB/HSV and back or whatever..?
- Dodger380468
-
Scratcher
100+ posts
<touching color?> block shouldn't have to be exact
Saturation and darkness come from the hex valueThe computer isn’t a human therefore it doesn’t know“If the human eye can’t tell the difference”
How do you quantify that?
There’s no destiction between what is “green” and what isn’t
All the computers sees is #528a42 and #609e4f (these are very slightly different shades of green, see how much of a difference they have?)
It doesn’t know what is green
The color slider is just a fancy way to edit this number
I think computers should be capable of knowing whether a color is close enough so that a human eye wouldn't be able to distinguish it.
Computers don’t see “color” they just see #4287f5 and roll with it as they are told
The computer just renders it as color but the computer has no way of interpreting color as, well, color
It's still possible, just make it so that it senses whether the Color, Saturation, and Darkness are close or not. I'm sure Scratch can even come up with a way better way to achieve this. Computers are capable of more than meets the eye (see what I did there?)
Also you literally said color
Color, Saturation, and Darkness are the values you input into Scratch. As said in the original post, even getting these values exactly right can still not work a lot of the time
- cookieclickerer33
-
Scratcher
1000+ posts
<touching color?> block shouldn't have to be exact
Because it looks at the entire screen instead of just within the sprites bounding boxAlso, yes, I feel like they could maybe use RGB values to check similarity between colors?That would break projects because the block uses hex color codes and you can do<touching color (join [#] [099e99]) ?>To bypass that, this is used quite often
Also the paint editor supports an alpha/transparency Chanel, this works with the touching color block as well
It’s better to just do<<touching color [#099e99] ?> or <touching color [#659e80] ?>>Or not use the block at all because of how slow it is
Why is it there if it's so broken? It really should be improved because it can be so useful in many situations
Flash used to do this, it would see if the color is inside of the sprites bounding box (that is the box that extends to the top, bottom, left, and right of the sprite) and then after it sees if the sprites pixels are touching the color looking at just the bounding box, not the entire screen. Because a sprite’s pixels will always be within its bounding box. This incressed the speed of flash games significantly!
- Discussion Forums
- » Suggestions
-
» <touching color?> block shouldn't have to be exact



