How to specify color such as tan?
Aaron
reic0024 at d.umn.edu
Mon Jun 24 21:30:33 UTC 2002
Hi,
To change the color of something, programatically, simply send it the
message #color:, passing along the color to which it should be changed.
To create a color for which there's not a class-side name, use
Color>>#r:g:b:. #r:g:b: takes values between 0 and 1. To adapt to using
the 0-255 convention, divide by 255.
E.g., let's assume morph is a morph. To change it to the tan you specify:
morph color: (Color r: (210 / 255) g: (180 / 255) b: (140 / 255) )
Regards,
Aaron
On Mon, 24 Jun 2002, Sergei Gnezdov wrote:
> How do I specify color if all I know is RGB numbers:
> RGB for tan: 210, 180, 140
>
> It is impossible to pick this color from color palete manually.
More information about the Squeak-dev
mailing list
|