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

#1 2012-02-17 16:23:50

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Color Pickers

Here is a simple script to make an all-color color picker.

set [left_edge_x v] to [-240]
set [height v] to [150]
set [width v] to [150]
repeat (height)
pen down
repeat (width)
change x by [1]
change pen color by ([200]/(width))
end
pen up
set x to (left_edge_x)
change y by [-1]
change pen shade by ([100]/(height))
end
Change the width variable to change width, height variable to change height.  Put in the x coordinate you want for the left edge of your color picker in the left_edge_x variable.  Put this entire script in a 1px black dot.  After the script, you should probably add a broadcast to continue the project.

Last edited by HD123 (2012-02-17 16:29:08)


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#2 2012-03-21 15:55:20

Scratchster77
New Scratcher
Registered: 2011-01-25
Posts: 3

Re: Color Pickers

How can you allow the user to pick a colour from this afterwards?
It's really cool though!  smile

Offline

 

Board footer