How to create a SqueakSource image?
Philippe Marschall
philippe.marschall at gmail.com
Tue Feb 7 22:22:56 UTC 2006
2006/2/7, Wilkes Joiner <wilkesjoiner at gmail.com>:
> I added a kludge to fix this.
>
> Color>>hex
> ^ (self toHexString: (self red)),
> (self toHexString: (self green)),
> (self toHexString: (self blue))
>
> Color>>toHexString: aNumber
> ^ ((aNumber * 255) asInteger hex allButFirst: 3) padded: #left to: 2 with: $0
>
> Not pretty but it works.
I think originally it was like this:
Color >> #hex
"Color white hex"
^ (Character value: (self red * 255.0) asInteger) hex,
(Character value: (self green * 255.0) asInteger) hex,
(Character value: (self blue * 255.0) asInteger) hex
the current code is from the latest Seaside version, strange ...
More information about the Squeak-dev
mailing list
|