Name
GetBestPen -- get best pen for color (V9.0)
Synopsis
pen = GetBestPen(id, color)
Function
This command searches for a pen in the palette specified by id whose color is the closest match to the color specified in the color argument and returns that pen. The color argument must be an RGB color.

Inputs
id
identifier of palette
color
RGB color to find closest matching pen for
Results
pen
pen that is the closest match for the specified color
Example
SetDrawPen(GetBestPen(1, #RED))
The code above sets the pen that most closely resembles red as the drawing pen.

Show TOC