This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-11-18 23:00:31

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Colour palet.

I was wondering how are colour palets made? how do you change the colour of a sprite acording to where you click?

Offline

 

#2 2008-11-18 23:09:14

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Colour palet.

that i think is done with the mouse x and y to determine the color.

Offline

 

#3 2008-11-19 05:36:10

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Offline

 

#4 2008-11-19 16:41:02

Auron
Scratcher
Registered: 2008-08-08
Posts: 20

Re: Colour palet.

<when green flag clicked>
<forever><if><< <mouse down?>
<set[ Colour ]effect to(  (( <mouse x> <+> <mouse y> ))

Tested it and it works!

Last edited by Auron (2008-11-19 16:42:59)

Offline

 

#5 2008-11-19 16:47:00

Auron
Scratcher
Registered: 2008-08-08
Posts: 20

Re: Colour palet.

OR try

For stage:

<when[ Stage ]clicked>
<broadcast[ Colour change

For colour changing sprite:

<when I receive[ Colour Change
<set[ Colour ]effect to( (( <mouse x> <+> <mouse y> ))

That works also!

Last edited by Auron (2008-11-19 16:48:53)

Offline

 

#6 2008-11-19 18:49:28

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Colour palet.

There's a premade one over here

http://scratch.mit.edu/projects/WidgetFarmer1/157427

that was harvested from my Fuzzy Paint project by WidgetFarmer1.  It uses the position of the mouse with respect to the pallet sprite to come up with the selected color and shade.  Greyscale is treated differently as it can not be generated by Set Color with numbers.  If you don't care about greyscale, you can use the one off my Feather Paint project, which is just a simpler version of this one.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer