Discuss Scratch

luke14444
Scratcher
11 posts

cant get color GRAY using set-pen-color-to + set-pen-shade

How can I get color GRAY using “set pen color to” and “set pen shade”?
or
How can I get color GRAY using blocks with number values (not color picker).

Looks like set-pen-color X works for 200 values (my bet is there is X mod 200 inside)
set-pen-shade makes a color more or less dark
I cant get BLACK, GRAY and WHITE colors this way. Help

Information on the web is not clear.
https://wiki.scratch.mit.edu/wiki/Set_Pen_Color_to_()_(color-picker_block)
“All of the possible colors accessible with the Set Pen Color to () block (without changing the shade.)”
I agree. I get 200 colors too.
“Reporter Input
One of Scratch 2.0's secrets is that the color box allows a reporter block to be inputted. In this case, when the block runs, the color will be set to the RGB value of the reporter. This situation can be replicated with the following custom block”
This does not work for me at all.
A-KouZ1
Scratcher
100+ posts

cant get color GRAY using set-pen-color-to + set-pen-shade

Just try dis
setpencolorto color pickerjoinworld then put this blox into box and change its value,setpencolortojoin0x824da2 then this should output the same colour

If you know how to work with rgb which hex, this is should be simple for you to get your desired color
Go to here to get colour tables for examples

then just change 824da2 with code that you picked in table, ignore #.


Gray colour that you asked:
setpencolortojoin0x808080 changed 824da2 with 808080 which corresponds to gray colour.

Last edited by A-KouZ1 (Nov. 21, 2017 12:36:13)

luke14444
Scratcher
11 posts

cant get color GRAY using set-pen-color-to + set-pen-shade

Thank you for great answer! It works. Yes, I know hex.

setpencolortoI was trying this blox
setpencolortoit works with this one

Last edited by luke14444 (Nov. 21, 2017 17:29:43)

A-KouZ1
Scratcher
100+ posts

cant get color GRAY using set-pen-color-to + set-pen-shade

That's no problem
wehgh “blox” is a typo, i was actually wanted to said “a block”

For this tip, Its possibility is depends on how Scratch could also treat hexadecimal as numbers.

0xF=15Reports the equation is truejoin0xE1-15 Report a result which 225

An conclusion and simple solution to selecting a color is by above,
an original one was actually uses
R*65536+G*256+B

Last edited by A-KouZ1 (Nov. 21, 2017 22:43:22)

_ThatBluAxolotl_
Scratcher
6 posts

cant get color GRAY using set-pen-color-to + set-pen-shade

I'm working on a maze game using @griffpatch ‘s tutorial. I don’t want the walls to be blue,but the blocks he is using are these:
setpencolorto53

Last edited by _ThatBluAxolotl_ (March 24, 2022 14:17:11)

NFlex23
Scratcher
1000+ posts

cant get color GRAY using set-pen-color-to + set-pen-shade

_ThatBluAxolotl_ wrote:

(#5)
I'm working on a maze game using @griffpatch ‘s tutorial. I don’t want the walls to be blue,but the blocks he is using are these:
setpencolorto53

Please don't necropost; thanks.

Powered by DjangoBB