Name

colorClosest( ) — find the closest matching color

Synopsis

GD::Image::colorClosest(red
                        ,

                        green
                        ,

                        blue)

This method returns the color table index of the color that best matches the color specified by the given red, green, and blue values, or a -1 if the table has no colors allocated.

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.