Searches for the nearest color on the table and returns the color index if successful.
* It looks in all palette entries and finds the minimum euclidian square distance.
* If the color matches the given color it returns immediately.
* See also \ref colorutl.
*
* \verbatim im.PaletteFindNearest(pal: imPalette, color: lightuserdata) -> index: number [in Lua 5] \endverbatim
* \ingroup palette
Searches for the nearest color on the table and returns the color index if successful. * It looks in all palette entries and finds the minimum euclidian square distance. * If the color matches the given color it returns immediately. * See also \ref colorutl. * * \verbatim im.PaletteFindNearest(pal: imPalette, color: lightuserdata) -> index: number [in Lua 5] \endverbatim * \ingroup palette