[PCB_FORUM] Converting Colors

I am having a problem with scripting color palette changes in Allegro 16.x.  
The number used in the scripting is very large, and I can't find how it's 
calculated.  Has anyone else tackled this yet?

I thought at first it was the color values used by Microsoft in some of their 
form stuff,  where the number is: (Red)+(256*Green)+(65536*Blue).  In this, 
black is 0 and white is 16777215.

This is not the case in this scheme.  Does anyone know how to calculate this?  
It is going to be very un-fun to have to record a script to manually enter the 
colors my users are used to :{

--
George Patrick
Tektronix, Inc.
Central Engineering, EDS Applications Support
P.O. Box 500, M/S 39-512
Beaverton, OR 97077-0001
* 503-627-5272 (voice)     * 503-627-5587 (fax)
http://www.tektronix.com<http://www.tektronix.com/>    
http://www.pcb-designer.com<http://www.pcb-designer.com/>

"Off-Grid and Proud of it!"

Other related posts: