Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
bestfit_color(3)		 Allegro manual 		bestfit_color(3)

NAME
     bestfit_color - Finds a palette color fitting the requested RGB values. Al-
     legro game programming library.

SYNOPSIS
     #include <allegro.h>

     int bestfit_color(const PALETTE pal, int r, int g, int b);

DESCRIPTION
     Searches  the  specified  palette	for  the  closest match to the requested
     color, which are specified in the VGA hardware 0-63  format.  Normally  you
     should call makecol8() instead, but this lower level function may be useful
     if  you  need  to	use  a palette other than the currently selected one, or
     specifically don't want to use the rgb_map lookup table.

RETURN VALUE
     Returns the index of the palette for the closest  match  to  the  requested
     color.

SEE ALSO
     makecol8(3)

Allegro 			  version 4.4.3 		bestfit_color(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=bestfit_color&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help