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

#1 2012-08-09 11:28:05

VictorNorman
New Scratcher
Registered: 2011-11-02
Posts: 2

What are the 200 pen colors?

When I choose "help" on the

 
change pen color by () 
block, it says there are 200 defined pen colors.

Can you give me the rgb values for these 200 pen colors?

The reason I would like this is that I'm creating a Greenfoot library that simulates as many of the Scratch blocks as possible, as a way to help Scratchers in my computing clubs to transition to Greenfoot.  If I'm going to implement a method changePenColorBy(), I need to have built in the 200 defined colors in Scratch.

Thanks much.  Hope to hear from you soon.

Victor Norman
Calvin College

Offline

 

#2 2012-08-09 12:03:27

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: What are the 200 pen colors?

It's basically the whole color spectrum from red all the way around to red.  smile
They aren't predefined, though.


http://i50.tinypic.com/312u714.jpg

Offline

 

#3 2012-08-11 16:48:46

VictorNorman
New Scratcher
Registered: 2011-11-02
Posts: 2

Re: What are the 200 pen colors?

So, they are computed?  So, how can I compute them?  What is the algorithm?  If (255, 0, 0)
(red) is the first color, then what is the next rgb value?

Thanks.

Vic

Offline

 

#4 2012-08-11 17:08:34

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: What are the 200 pen colors?

VictorNorman wrote:

So, they are computed?  So, how can I compute them?  What is the algorithm?  If (255, 0, 0)
(red) is the first color, then what is the next rgb value?

Thanks.

Vic

in scratch it works with HSB, not RGB...
the pen color is hue, brightness is brightness  tongue
try to find a way to convert  hmm

Offline

 

#5 2012-08-12 08:48:35

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: What are the 200 pen colors?

H = Hue
S = Saturation
B = Brightness

Just for information.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#6 2012-08-12 09:04:39

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: What are the 200 pen colors?

VictorNorman wrote:

So, they are computed?  So, how can I compute them?  What is the algorithm?  If (255, 0, 0)
(red) is the first color, then what is the next rgb value?

Thanks.

Vic

It's in HSL format, and the hue is calculated like this:

((Input) * ((360) / (200)))


http://i50.tinypic.com/312u714.jpg

Offline

 

Board footer