Does anyone have (or know of) a good algorithm for finding the closest color available in a palette? I am using a 256-color palette, with 8 bits each for the r,g, and b components. Allegro uses a weighted squares method, which works OK, but it does not seem to be as accurate as the CPalette::GetNearestColorIndex() function in VC++. I am writing an app for DOS, so I can't use the VC++ function. Any help would really be appreciated.



Jesus is Lord!