When I enter "color" into the Search bar of a sketch's viewer, I see a tile called 'Sketch's color' with an assignment of a colored square. When I select "show categories" on the menu of this tile, I get "color & border". However, I don't see this tile in the "color & border" category. First question - why? Second question - and more important - why doesn't this tile actually change the color of my sketch?
Basically, I'm looking for ways of changing the color of a sketch - via scripting. Eventually I want to actually set the RGB values and realize I may have to revert to the underlying text/code of a tiled script.
Thanks, Randy
Hi Randy -
Just out of curiosity is this what you are looking for?
http://www.squeakland.org/project.jsp?http://squeak.hpl.hp.com/~andreas/Colo...
Cheers, - Andreas
Randy Heiland wrote:
When I enter "color" into the Search bar of a sketch's viewer, I see a tile called 'Sketch's color' with an assignment of a colored square. When I select "show categories" on the menu of this tile, I get "color & border". However, I don't see this tile in the "color & border" category. First question - why? Second question - and more important - why doesn't this tile actually change the color of my sketch?
Basically, I'm looking for ways of changing the color of a sketch - via scripting. Eventually I want to actually set the RGB values and realize I may have to revert to the underlying text/code of a tiled script.
Thanks, Randy
Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
Thanks Andreas,
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script. However, I don't think this addresses one of my wishes - which is to be able to set the color of a sketch's stamp (multiple stamps, multiple colors, assigned by an RGB vector). Another wish is to be able to dynamically set the color of a pen trail, again via RGB.
--Randy
On Jun 22, 2005, at 9:20 PM, Andreas Raab wrote:
Hi Randy -
Just out of curiosity is this what you are looking for?
http://www.squeakland.org/project.jsp?http://squeak.hpl.hp.com/ ~andreas/ColorSketch.001.pr
Cheers,
- Andreas
Randy Heiland wrote:
When I enter "color" into the Search bar of a sketch's viewer, I see a tile called 'Sketch's color' with an assignment of a colored square. When I select "show categories" on the menu of this tile, I get "color & border". However, I don't see this tile in the "color & border" category. First question - why? Second question - and more important - why doesn't this tile actually change the color of my sketch? Basically, I'm looking for ways of changing the color of a sketch
- via
scripting. Eventually I want to actually set the RGB values and realize I may have to revert to the underlying text/code of a tiled script. Thanks, Randy _______________________________________________ Squeakland mailing list Squeakland@squeakland.org http://squeakland.org/mailman/listinfo/squeakland
Hi Randy -
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script.
Yeah, and there is even more magic that you don't see ;-) I just wanted to find out whether this was the effect you were looking for or not. Well, it was worth a try ;-)
Cheers, - Andreas
Andreas, When I go to save/publish your project, I'm prompted with "Would you like to include all the changes in the change set as part of this publishing operation?". I'm still a newbie regarding change sets in Squeak, so can you/someone educate me on what happens if I say "Yes" to this? Will my underlying Squeak image change - and no longer be equivalent to the Squeakland download?
thanks, Randy
-----Original Message----- From: Andreas Raab [mailto:andreas.raab@gmx.de] Sent: Thursday, June 23, 2005 12:54 AM To: Randy Heiland Cc: squeakland@squeakland.org Subject: Re: [Squeakland] sketch's color
Hi Randy -
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script.
Yeah, and there is even more magic that you don't see ;-) I just wanted to find out whether this was the effect you were looking for or not. Well, it was worth a try ;-)
Cheers,
- Andreas
Randy -
Andreas, When I go to save/publish your project, I'm prompted with "Would you like to include all the changes in the change set as part of this publishing operation?". I'm still a newbie regarding change sets in Squeak, so can you/someone educate me on what happens if I say "Yes" to this? Will my underlying Squeak image change - and no longer be equivalent to the Squeakland download?
Yes, you need to yes, and no, the image is no longer equivalent to the Squeakland download. Like I said there is more magic than meets the eye in this project.
Cheers, - Andreas
Publishing a project does not modify your image. Loading it does, but if you do not save the image afterwards then all is fine. Andreas' project did some changes to the image, this is the "magic" that makes recoloring sketches work. So if you want to load the project and still have the magic in it, say yes.
- Bert -
Am 23.06.2005 um 15:55 schrieb Randy Heiland:
Andreas, When I go to save/publish your project, I'm prompted with "Would you like to include all the changes in the change set as part of this publishing operation?". I'm still a newbie regarding change sets in Squeak, so can you/someone educate me on what happens if I say "Yes" to this? Will my underlying Squeak image change - and no longer be equivalent to the Squeakland download?
thanks, Randy
-----Original Message----- From: Andreas Raab [mailto:andreas.raab@gmx.de] Sent: Thursday, June 23, 2005 12:54 AM To: Randy Heiland Cc: squeakland@squeakland.org Subject: Re: [Squeakland] sketch's color
Hi Randy -
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script.
Yeah, and there is even more magic that you don't see ;-) I just wanted to find out whether this was the effect you were looking for or not. Well, it was worth a try ;-)
Cheers,
- Andreas
Am 23.06.2005 um 04:40 schrieb Randy Heiland:
Thanks Andreas,
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script. However, I don't think this addresses one of my wishes - which is to be able to set the color of a sketch's stamp (multiple stamps, multiple colors, assigned by an RGB vector).
The stamp in Andreas' example has the right color, doesn't it?
So what you need is setting the color from RGB. There is a nice apparatus for visualizing the RGB color model: the color cube. You can even buy on at
http://www.colorcube.com/puzzle/puzzle.htm
It's made by arranging tiny cubes in a three-dimensional grid according to their colors. Black is at the origin (0,0,0), white at the opposite corner (1,1,1).
This cube can be simulated with an etoy project, and thus positions converted into colors. Here's how:
1) Make images of the color cube sliced into layers. Just drop the attached images into a holder:
2) Make an object "cube" showing the current slice (as in an holder animation) 2) Get an Ellipse, and give it three variables named "r", "g", and "b", place it on top of the cube 3) Make a ticking script that maps r, g, and b: - the slice is selected according to r (set holder's cursor to r, and cube's graphic to holder's graphic-at-cursor) - the ellipse is moved according to g and b ("g" moves on the x- direction, "b" in y) 4) set "Ellipse's color" to "Ellipse's colorUnder" 5) now changing r, g, and b in the (0...5) interval sets the ellipses color.
Here is a project to demonstrate this:
http://www.squeakland.org/project.jsp?http://impara.de/ ~bert/RGBColors.002.pr
And here's an older version using a slightly different approach to convert 3D-2D:
http://www.squeakland.org/project.jsp?http://impara.de/ ~bert/RGBColors.001.pr
A much less etoys-like approach is this: make a tile that directly converts RGB numbers into a color:
1) make a variable "col", set its type to Color 2) make variables "r", "g", "b" 3) drag out the arrow to assign to "col", this makes a new script 4) switch to text mode 5) use this to assign the color from r, g, and b:
script1 self setCol: (Color r: self getR g: self getG b: self getB)
6) set r to 1, g to 1, b to 0, run the script, col will be yellow.
Another wish is to be able to dynamically set the color of a pen trail, again via RGB.
Andreas' hack could eventually be used to recolor pen trails (that is, all of them at once).
- Bert -
-----Original Message----- From: Bert Freudenberg [mailto:bert@impara.de] Sent: Thursday, June 23, 2005 8:32 AM To: squeak list Cc: Randy Heiland Subject: Re: [Squeakland] sketch's color
Am 23.06.2005 um 04:40 schrieb Randy Heiland:
Thanks Andreas,
Honestly, I'm not sure. For starters, the world/fixSketches script is a bit of magic I don't understand, not to mention that it's apparently a text-only script. However, I don't think this addresses one of my wishes - which is to be able to set the color of a sketch's stamp (multiple stamps, multiple colors, assigned by an RGB vector).
The stamp in Andreas' example has the right color, doesn't it?
So what you need is setting the color from RGB. There is a nice apparatus for visualizing the RGB color model: the color cube. You can even buy on at
http://www.colorcube.com/puzzle/puzzle.htm
It's made by arranging tiny cubes in a three-dimensional grid according to their colors. Black is at the origin (0,0,0), white at the opposite corner (1,1,1).
This cube can be simulated with an etoy project, and thus positions converted into colors. Here's how:
- Make images of the color cube sliced into layers. Just drop the
attached images into a holder:
Thanks Bert. I'm all too familiar with the RGB color model, having done computer graphics for many years. If you *generated* those slices in etoys (via a script), *that's* what I'd love to see. I added a section "Coloring stamps" on my web page which will hopefully shed some light on what I'd like to do: http://poincare.uits.iupui.edu/~heiland/squeak
--Randy
squeakland@lists.squeakfoundation.org