DECLARE FUNCTION DQBfindCol (BYVAL Red, BYVAL Green, BYVAL Blue)
Red - Red hue of the color to find
Green - Green hue of the color to find
Blue - Blue hue of the color to find
An INTEGER value ranging 0-255, holding the index of the color found
DQBfindCol searches the current palette for the color that best fits with the specified red, green and blue hues. It can be really useful to create a blender map in conjunction with the DQBsetBMap routine.
This function may return bad results, depending on the current palette and the specified hues, so use it with caution. As it scans the palette, you'll see the screen flickering a little during each call to this function; to avoid this, you can use the DQBfindPalCol, that allows to search for a color into any specified palette.