I suggest that in sensing there would be a
<color touching>block that would give you a number from 1 to 255 (the range scratch has for all the different colors) based on the color that that specific sprite would be touching. It would be very useful for saving pictures, sensing all the colors scratch has, etc...
Offline
Firstly it would need to return three numbers from 1 to 255, one for the red value, one for the green value and one for the blue value, and secondly, how would it work? Would it go from the middle pixel? If so, what would happen if the sprite was odd number of pixels tall/wide?
Offline
It would be the costume center. It wouldn't need 3 numbers and I just realized that it would be from 1-200. It would take the color that it's touching and match it up with the number that scratch uses from 1-200 that's the closes to it. It wouldn't need 3 numbers because you don't need 3 numbers to use the set pen color block. You need 1 number from 1-200.
Offline
It's impossible to determine every colour using just one number.
Offline
RedRocker227 wrote:
It's impossible to determine every colour using just one number.
but it's possible to determine every color scratch uses using just one number.
Offline
TorbyFork234 wrote:
RedRocker227 wrote:
It's impossible to determine every colour using just one number.
but it's possible to determine every color scratch uses using just one number.
Erm, no it's not. Scratch doesn't use some "magical" colours, they're the same colours as everything else.
Offline
RedRocker227 wrote:
TorbyFork234 wrote:
RedRocker227 wrote:
It's impossible to determine every colour using just one number.
but it's possible to determine every color scratch uses using just one number.
Erm, no it's not. Scratch doesn't use some "magical" colours, they're the same colours as everything else.
Then how come they only need one number for the pen color?
Offline
TorbyFork234 wrote:
RedRocker227 wrote:
TorbyFork234 wrote:
but it's possible to determine every color scratch uses using just one number.Erm, no it's not. Scratch doesn't use some "magical" colours, they're the same colours as everything else.
Then how come they only need one number for the pen color?
I've never used that block, but I'd imagine that only sets the actual colour, so you couldn't adjust the shade or anything.
Offline
RedRocker227 wrote:
TorbyFork234 wrote:
RedRocker227 wrote:
Erm, no it's not. Scratch doesn't use some "magical" colours, they're the same colours as everything else.Then how come they only need one number for the pen color?
I've never used that block, but I'd imagine that only sets the actual colour, so you couldn't adjust the shade or anything.
yes. so there could also be
<shade touching>
Offline
TorbyFork234 wrote:
RedRocker227 wrote:
TorbyFork234 wrote:
but it's possible to determine every color scratch uses using just one number.Erm, no it's not. Scratch doesn't use some "magical" colours, they're the same colours as everything else.
Then how come they only need one number for the pen color?
Because that actually just sets a "hue" value. The actual colour is a hexadecimal value which also depends on the pen shade as well as pen hue. Plus, there's nothing stopping you from typing a decimal number in there too, so the pen hue can be ANYTHING between 1 and 200, not just an integer.
Offline
@RedRocker:
It's actually possible to use one colour for all the possible colours. There are only 16777217 colours in scratch, so every unique value can indeed represent a unique colour!
The numbers that scratch uses from 1 to 200 are indeed hue-only. Scratch takes shade (value/brightness) separately into account, and completely forgets about saturation. It would indeed be better if Scratch added full colour data types, like Bingo and Panther have!
Offline
Ya, well of course you could, but how would you remember any of them?
Offline
RedRocker227 wrote:
Ya, well of course you could, but how would you remember any of them?
Well, hex colours actually are single numbers, but they are human readable because they were designed in such a way that every digit or two corresponds to a colour. It would be a lot more difficult to do so with decimal
Offline