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

#1 2010-03-21 14:10:50

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Colour editing for blocks

As an interesting thing to try, I decided I wanted to change the colour of one of the block classes. It didn't work.

Here's what I did:

Scratch-blocks > VariableBlockMorph > Initialization > Initialize↓

initialize
     Super initialize.
     commandSpec <- ' '.
     self color: (Color
                     r: 0.0
                     g: 1.0
                     b: 1.5)

I basically changed the RGB values, saved for end user, but the colour of the blocks did not change.

What did I do wrong? and could someone please tell me what those RGB values normally are? I forgot to note that down before I made the change.

Many thanks, Sparks


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2 2010-03-21 17:11:32

climber59
Scratcher
Registered: 2009-12-15
Posts: 100+

Re: Colour editing for blocks

Go to

Scratch-Objects >> ScriptableScracthMorph >> click class >> blockSpecs >> blockColorFor:

then you can change the hue, saturation, and value of any type of blocks. Changing control has a weird effect though.

Also
r: 0.4
g: 1.0
b: 0.4)

Last edited by climber59 (2010-03-21 17:13:06)


Check out my projects if you have a chance.

Offline

 

#3 2010-03-21 17:57:51

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Colour editing for blocks

climber59: Many thanks, Just what I needed.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

Board footer