[FIX] Color >> asColorref
Hannes Hirzel
hannes.hirzel.squeaklist at bluewin.ch
Fri Mar 22 04:05:29 UTC 2002
Doug Way <dway at riskmetrics.com> wrote:
>
> Hannes Hirzel wrote:
>
> > "Change Set: ColorRefFix
> > Date: 24 February 2002
> > Author: Hannes Hirzel
> >
> > The method Color >> asColorref which converts a Color to a RBG value now
> > gives back
> > really Red-Green-Blue."
> >
> >
> > Conversion examples:
> >
> > Color red asColorref hex '16rFF0000'
> > Color green asColorref hex '16rFF00'
> > Color blue asColorref hex '16rFF'
> > Color cyan asColorref hex '16rFFFF'
> > Color yellow asColorref hex '16rFFFF00'
> > Color magenta asColorref hex '16rFF00FF'
>
> I thought maybe this was discussed briefly, but I couldn't find any
> replies to this.
>
> Anyway, does anyone know if the term "Colorref" has a standard meaning
> (on Windows, I believe)? I think a ColorRef is possibly supposed to be
> reversed from the typical RGB order, but I'm not sure. So then Hannes'
> fix to switch it to RGB wouldn't be good.
>
> Or if someone has a testcase or good example of where this method would
> be used, that would be helpful.
>
> In any case, there is definitely a bug in the current method, because it
> accesses "self green" twice, and never accesses "self blue", so at least
> that should be fixed.
>
> - Doug Way
> dway at riskmetrics.com
Doug,
this has not just a Windows meaning it is used in the HTML (and other)
contexts.
I need and RGB color (in this sequence) for doing HTML/CSS export. See
Chuck Musciano & Bill Kennedy, HTML & XHTML, Fourth Edition, 2000,
O'Reilly; paragraph 4.6.3.2. - the color attribute.
Perhaps you could include this reference in the comment, so it's clear
why this was done in the future.
Regards
Hannes Hirzel
More information about the Squeak-dev
mailing list
|