[FIX] Color >> asColorref

Doug Way dway at riskmetrics.com
Fri Mar 22 04:50:21 UTC 2002


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




More information about the Squeak-dev mailing list