Maybe this will help....

taken from:
http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/8C5BEBBC987D60BC85256802007C3AAE

An OLE_COLOR value is a BGR (Blue, Green, Red) value.  To determine the BGR
value, specify blue, green, or red (each of which has a value from 0 - 255)
in the following formula:

BGR value = (blue * 65536) + (green * 256) + red

Note: In the MapBasic programming environment, please note that MapBasic
uses the following formula to calculate the RGB values:

RGB value = (red * 65536) + (green * 256) + blue

If working with RGB color values (e.g. values used with a MapBasic
application), it will be necessary to convert the colors to BGR before
those color values can be used in MapX.

Another way to calculate these color values back and forth:

1.  Use the Windows Calculator in Scientific view.  Its typically found
under Start>Programs>Accessories
2.  Type in the RGB color in decimal mode  e.g.: 12345678
3.  Switch to hexadecimal, write down value shown in window  e.g.: BC614E
4.  Think of it this way now:

The Green value is a constant center value in RGB and BGR values, so by
getting the hex value of 12345678 which equals BC614E, it is possible to
switch the first two and the last two values of BC614E and retype them in
the calculator in hex mode (4E61BC) then switch calculator back to decimal
mode and the BGR value will be represented (5136828).


Regards,
-Bill


Mail List:[EMAIL PROTECTED]
                                                                  
 From:     "Erin Rubio" <[EMAIL PROTECTED]> on 02/06/2001  
           01:35 PM                                               
                                                                  
                                                                  
 To:       <[EMAIL PROTECTED]>                    
                                                                  
 cc:                                                              
                                                                  
 Subject:  MI-L Translating MapInfo colors to hex                 
                                                                  



Hi All,

Does anyone have an algorithm that translates MapInfo colors to
hexidecimal colors?

Thanks in advance,

Erin Rubio

Spatial Insights, Inc.
A Geographic Information Services Company
8221 Old Courthouse Road Suite 203 Vienna, VA  22182
Tel: 703-827-7034  Fax: 703-827-7037
Sales: 800-347-5291
[EMAIL PROTECTED]     www.spatialinsights.com



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.







_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to